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

    Jul 21, 2016 · Once that happens, code will resume execution at the "catch". If there is a breakpoint within a function that's evaluated as part of a "when", that breakpoint will suspend …

  2. 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 all Java exceptions with:

  3. The difference between try/catch/throw and try/catch(e)/throw e

    The third try-catch block is different. When it throws the exception, it will change the source and the stack trace, so that it will appear that the exception has been thrown from this method, …

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

    I recommend using catch(Exception ex) when you plan to reuse the exception variable only, and catch (alone) in other cases. Just a matter of style for the second use case, but if personally …

  5. When is finally run if you throw an exception from the catch block?

    If you re-throw an exception within the catch block, and that exception is caught inside of another catch block, everything executes according to the documentation.

  6. c# - Catch multiple exceptions at once? - Stack Overflow

    try { WebId = new Guid(queryString["web"]); } catch (FormatException) { WebId = Guid.Empty; } catch (OverflowException) { WebId = Guid.Empty; } Is there a way to catch both exceptions …

  7. Is it possible in Java to catch two exceptions in the same catch …

    Jun 26, 2012 · catch (Exception e, ExtendsRuntimeException re) { // common logic to handle both exceptions } Is it possible to avoid duplicating the handler code in each catch block?

  8. 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 …

  9. 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 …

  10. Exception thrown inside catch block - will it be caught again?

    Sep 27, 2008 · One related and confusing thing to know is that in a try- [catch]-finally structure, a finally block may throw an exception and if so, any exception thrown by the try or catch block …