Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

[Bug] NO_DEFAULT_CASE doesn't display useful info.

#20

The NO_DEFAULT_CASE debug macro does not display useful information. This is due to it not using UNICODE characters to pass in the file name (the FILE macro needs to be surrounded bu the TEXT() macro).

Reported by Jocelyn Legault · November 25th, 2009 @ 09:14 PM

State: resolved
Milestone: v2.0.0
Assigned to: npp-community npp-community

Activity

  1. Jocelyn Legault
    Jocelyn Legault
    • Assigned user changed from Jocelyn Legault to npp-community

    (from [7940521c667fa40066d3d386b1f119cbc6b84c52]) NO_DEFAULT_CASE macro: fix message

    • The message of the NO_DEFAULT_CASE is now properly treated as UNICODE.
    • The message and the caption were inverted in the ::MessageBox call and are now fixed.
    • If the NO_DEFAULT_CASE macro is invoked, the user now has the possibility to break into the code to the faulty line.

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info. state:needs_hack responsible:npp-community]

    Signed-off-by: Jocelyn Legault jocelynlegault@gmail.com
    http://github.com/joce/npp-community/commit/7940521c667fa40066d3d38...

    November 25th, 2009 @ 10:06 PM

  2. Jocelyn Legault
    Jocelyn Legault
    • State changed from open to needs_ack

    November 25th, 2009 @ 10:59 PM

  3. Thell Fowler
    Thell Fowler
    • Assigned user changed from npp-community to Jocelyn Legault

    Shouldn't line 137 'Unhanded' be 'Unhandled'?

    I agree with your comment here as well that an exception may be nice here. I've been getting quite a bit out of the boost::exception library when it comes to testing.

    We talked about possibly starting to incorporate boost into the core parts of n++, and while this seems like a bad reason to do so, it is something to keep in mind.

    November 28th, 2009 @ 08:58 PM

  4. Thell Fowler
    Thell Fowler
    • Assigned user changed from Jocelyn Legault to npp-community
    • State changed from needs_ack to acked
    • Milestone set to v2.0.0

    Made the change to the text.

    December 5th, 2009 @ 09:00 PM

  5. Thell Fowler
    Thell Fowler
    • State changed from acked to needs_ack

    Updated patch series @:

    http://github.com/almostautomated/npp-community/tree/jl/LH-20/fix-N...


    common.h: make NO_DEFAULT_CASE less intrusive

    • Add NPPCR_DEBUG_NO_DEFAULT_CASE ifdef check so developers can have more control over when the switch statements from original N++ code gets in the way of running N++CR debug build. The default behaviour is changed to have OutputDebugString print to console instead of a MessageBox.

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info. state:needs_ack responsible:npp-community]

    Signed-off-by: Thell Fowler git@tbfowler.name

    December 5th, 2009 @ 09:48 PM

  6. Thell Fowler
    Thell Fowler

    Modified to use Debug::OutputF

    Prior to going onto next for 2.0 this will need to be modified again because of the changes that are introduced in func_guard [ticket: #8 [Feature] Add new function guard to track entering leaving function in debug ...] branch.

    http://github.com/almostautomated/npp-community/commits/jl/LH-20v2/...

    December 5th, 2009 @ 10:23 PM

  7. Thell Fowler
    Thell Fowler

    (from [61f09ebb2297cdb4b133610874753517b1cdbdbd]) common.h: make NO_DEFAULT_CASE less intrusive

    • Add NPPCR_DEBUG_NO_DEFAULT_CASE ifdef check so developers can have more control over when the switch statements from original N++ code gets in the way of running N++CR debug build. The default behaviour is changed to have OutputDebugString print to console instead of a MessageBox.

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info. state:needs_ack responsible:npp-community]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/61f09ebb2297...

    December 5th, 2009 @ 10:34 PM

  8. Thell Fowler
    Thell Fowler

    (from [fa99b32c5a97a7de766330db8ed8ff6ba7600c9a]) NO_DEFAULT_CASE macro: move and make controllable.

    • Move NO_DEFAULT_CASE macro to npp_debug.h since it is a debugging utility and add npp_debug.h to precompiled headers.

    • Make NO_DEFAULT_CASE use Debug::Outputf

    • Add NPPCR_DEBUG_NO_DEFAULT_CASE ifdef check so developers can have more control. When running a debug build the messagebox and console output are both active when NPPCR_DEBUG_NO_DEFAULT_CASE is defined, and only the console output when it isn't.

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info. state:needs_ack responsible:npp-community]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/fa99b32c5a97...

    December 6th, 2009 @ 06:05 PM

  9. Thell Fowler
    Thell Fowler

    Version 3 has been pushed to:

    http://github.com/almostautomated/npp-community/commits/jl/LH-20v3/...

    Although it is nice to have a blunt indicator that something needs to be fixed, the old N++ code base switch statements shouldn't be so intrusive as to hinder development of N++CR. This change allows the developer to decide when they will go back to the old code and work on testing/fixing the switch statements but still gives a console indication whenever the debugger is attached and the DEBUG build is being run.


    macro: move and make controllable.

    • Move NO_DEFAULT_CASE macro to npp_debug.h since it is a debugging utility and add npp_debug.h to precompiled headers.

    • Make NO_DEFAULT_CASE use Debug::Outputf

    • Add NPPCR_DEBUG_NO_DEFAULT_CASE ifdef check so developers can have more control. When running a debug build the messagebox and console output are both active when NPPCR_DEBUG_NO_DEFAULT_CASE is defined, and only the console output when it isn't.

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info. state:needs_ack responsible:npp-community]

    Signed-off-by: Thell Fowler git@tbfowler.name

    December 6th, 2009 @ 06:09 PM

  10. Thell Fowler
    Thell Fowler
    • State changed from needs_ack to proposed

    (from [aa9a31eda22eaa190865298b9de9f95d6c620c12]) Merge branch 'jl/LH-20v3/fix-NO_DEFAULT_CASE-macro' into pu

    • jl/LH-20v3/fix-NO_DEFAULT_CASE-macro: NO_DEFAULT_CASE macro: move and make controllable. NO_DEFAULT_CASE macro: fix message

    Conflicts:

    PowerEditor/src/MISC/Debug/npp_debug.h
    PowerEditor/src/precompiled_headers.h
    

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info. state:proposed]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/npp-community/npp-community/commit/aa9a31eda22eaa...

    December 7th, 2009 @ 06:14 AM

  11. Thell Fowler
    Thell Fowler

    (from [0e2d2f7a76af4a467cf1440b9c794fa815b3d246]) Merge branch 'jl/LH-20v3/fix-NO_DEFAULT_CASE-macro' into pu

    • jl/LH-20v3/fix-NO_DEFAULT_CASE-macro: NO_DEFAULT_CASE macro: move and make controllable. NO_DEFAULT_CASE macro: fix message

    Conflicts:

    PowerEditor/src/MISC/Debug/npp_debug.h
    PowerEditor/src/precompiled_headers.h
    

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info. state:proposed]

    Acked-by: Thell Fowler git@tbfowler.name
    http://github.com/npp-community/npp-community/commit/0e2d2f7a76af4a...

    December 7th, 2009 @ 10:04 PM

  12. Thell Fowler
    Thell Fowler

    (from [6be49cf6bd286c6bbb3ffd942d7594ec08d758e1]) Merge branch 'jl/LH-20v3/fix-NO_DEFAULT_CASE-macro' into pu

    Conflicts:

    PowerEditor/src/MISC/Debug/npp_debug.h
    PowerEditor/src/precompiled_headers.h
    

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info.]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/6be49cf6bd28...

    December 22nd, 2009 @ 03:53 PM

  13. Thell Fowler
    Thell Fowler

    (from [ba8ebd74f0215a8befd42cd5a5d5fce4812cd595]) Merge branch 'jl/LH-20v3/fix-NO_DEFAULT_CASE-macro'

    • jl/LH-20v3/fix-NO_DEFAULT_CASE-macro: NO_DEFAULT_CASE macro: move and make controllable. NO_DEFAULT_CASE macro: fix message

    Conflicts:

    PowerEditor/src/MISC/Debug/npp_debug.h
    PowerEditor/src/precompiled_headers.h
    

    [#20 [Bug] NO_DEFAULT_CASE doesn't display useful info.]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/npp-community/npp-community/commit/ba8ebd74f0215a...

    January 19th, 2010 @ 12:02 AM

  14. Thell Fowler
    Thell Fowler
    • State changed from proposed to resolved

    January 19th, 2010 @ 12:07 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.