C Sharp (C#) - Exception Handling
Identify the error in this code snippet:
try {
// some code
} catch (Exception ex) {
throw ex;
}try {
// some code
} catch (Exception ex) {
throw ex;
}throw ex; effectthrow ex; throws the exception but resets the stack trace, losing original error location.throw; without specifying the exception variable.throw ex; resets the stack trace, losing original error info. -> Option B15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions