About 10,500,000 results
Open links in new tab
  1. c# - Catching exceptions with "catch, when" - Stack Overflow

    Jul 21, 2016 · Does using the 'catch, when' feature make exception handling faster because the handler is skipped as such and the stack unwinding can happen much earlier as when compared to handling …

  2. Difference between catch (Exception), catch () and just catch

    Both constructs (catch () being a syntax error, as sh4nx0r rightfully pointed out) behave the same in C#. The fact that both are allowed is probably something the language inherited from C++ syntax. , can …

  3. Correct Try...Catch Syntax Using Async/Await - Stack Overflow

    19 Cleaner code using async/await with Promise catch handler. From what I see, this has been a long-standing problem that has bugged (both meanings) many programmers and their code. The Promise …

  4. Difference between try-finally and try-catch - Stack Overflow

    May 18, 2010 · Within the catch block you can respond to the thrown exception. This block is executed only if there is an unhandled exception and the type matches the one or is subclass of the one …

  5. Why should I not wrap every block in "try"-"catch"?

    38 You don't need to cover every block with try-catches because a try-catch can still catch unhandled exceptions thrown in functions further down the call stack. So rather than have every function have a …

  6. Exception handling try catch inside catch - Stack Overflow

    I recently came across code written by a fellow programmer in which he had a try-catch statement inside a catch! Please forgive my inability to paste the actual code, but what he did was something

  7. sql server - @@ERROR and/or TRY - CATCH - Stack Overflow

    Will Try-Catch capture all errors that @@ERROR can? In the following code fragment, is it worthwhile to check for @@ERROR? Will RETURN 1111 ever occur? SET XACT_ABORT ON BEGIN …

  8. c# - Return in catch block? - Stack Overflow

    0 You can add a return in the catch block. You explicitly know that your code will return and continue execution instead of halting at the catch block.

  9. C++ catching all exceptions - Stack Overflow

    Note that most crashes are not caused by exceptions in C++. You can catch all exceptions, but that won't prevent many crashes.

  10. Can I catch multiple Java exceptions in the same catch clause?

    22 If there is a hierarchy of exceptions you can use the base class to catch all subclasses of exceptions. In the degenerate case you can catch Java exceptions with: