C# new preprocessor directives "#pragma exception before"
See original GitHub issue2.1.403:
Steps to Reproduce:
New implementation
Expected Behavior:
#pragma exeception before
This is the normal situation that we all know today, I did a treatment with an alert ja and when I give an exception within a delegate that execption of a warning in Visual Studio the #pragma would be to disable this warning that Visual Studio and continue the Code because it is an exception that has already been handled.
Sugestion:
Reference:
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Why is #pragma considered a preprocessor directive?
Pre-processing is specifically a source to source translation before any compilation begins. Therefore #pragma warning must not be pre-processed ...
Read more >C# preprocessor directives #pragma exception "disable ...
When placed #pragma he simply ignores continues because he knows he has a treatment before breaking the code.
Read more >Pragma directives and the __pragma and _Pragma keywords
Describes the pragma directives available in Microsoft Visual C and ... a conditional directive, to provide new preprocessor functionality.
Read more >pragma Directive in C/C++
This directive is a special purpose directive and is used to turn on or off some features. These types of directives are compiler-specific ......
Read more >How to use the preprocessor directive ' #pragma ' in C ...
Best-practice for new code is to use -std=c23 (or -std=c2x until your compiler implements the C23 standard). Treat bool , true , and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok. So it sounds like this is purely a tooling request, and is unrelated to making changes to the language or adding pragmas.
For example, WinDbg gives a lot of control over exceptions: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/controlling-exceptions-and-events#span-idcontrollingexceptionsandeventsfromthedebuggerspanspan-idcontrollingexceptionsandeventsfromthedebuggerspancontrolling-exceptions-and-events-from-the-debugger
If you’d like the VS debugger to have support for some sort of “don’t actually pause for exceptions within this block” i recommend you file a VSFeedback item here:
I don’t understand your response. You stated:
I’m tryin got understand what you mean by ‘disable exception’ Can you clarify? Note: if this is hard to explain here, you can go to gitter.im/roslyn and we can discuss things there. But right now, it’s not actually clear what you’re asking for.