Partial recovery from an Exception [duplicate]
This question already has answers here: Efficient try / catch block usage? (6 answers) Is rethrowing an exception leaking an abstraction? (4 answers) Closed 10 years ago. I have seen Exception Handling blocks that they were throwing the recently caught Exception in the catch block. Something like: } catch ( Exception $e ) { // […]
Check some value between each function call
Can you recommend a nice way of checking a particular value between calls to a set of functions?
Invalid data returned, which HttpCode to return?
My web application calls a third party API.
Invalid data returned, which HttpCode to return?
My web application calls a third party API.
Invalid data returned, which HttpCode to return?
My web application calls a third party API.
Automating form error handling
I’m not sure if I’m being clever or making things more difficult. I’m working within a custom MVC framework, and within some of my “views” which contain forms I’m preserving input and styling errors as follows:
Functions returning either “OK” or “error message” instead of procedures
I have joined writing middle-size multi-purpose database application as co-lead. It currently has about 150 tables (and growing) and overall functionality you can imagine as very small ERP.
Whats the best way to handle errors in code?
So I’m a little concerned about my error handling… Currently my execution path looks something like this:
How to handle errors best addressed in a higher abstraction layer and dependent on state inferred in current layer?
I have a use-case that can be repaired, but the logic for repairing it is best done in a higher level of abstraction. Just throwing exception/failure is ugly because it’s hard to pass back up through the stack the information needed for the parent-layer to know how to fix it.