KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is having a nested Try/Catch a signal that you're not coding cleanly? I wonder because in my catch I'm calling another method and if that fails I get another runtime error so I'm tempted to wrap those calls in the catch with another try/catch again. I wonder if this is normal to do this? e.g. catch (Exception ex) { transaction.VoidOrder(transactionID); LogError(ex.ToString()); Response.Redirect("Checkout", false); } so the VoidOrder or even the LogError methods could bomb out. Right now when I call VoidOrder , I get a null ref on transactionID because it calls a BL method and in that BL method I'm re-throwing so I can catch it at this higher level in code above. But if I'm throwing again inside a catch then I need to catch that as well.
Tags (comma-separated)
Save Edits
Cancel