KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is either one of these risky? Is one better? Or is it one of those things you print out and throw a dart at to decide? I want to do this now that I understand how finally works: try { stuff that changes something... } catch (System.Exception ex) { something.worked = false; something.err = ex.Message; } finally { stuff.close(); return something; } But I've seen: try { stuff that changes something... return something; } catch (System.Exception ex) { something.worked = false; something.err = ex.Message; return something; } finally { stuff.close(); }
Tags (comma-separated)
Save Edits
Cancel