Error Handling OOA/OOD xuyingxiao@126.com
Error Handling OOA/OOD xuyingxiao@126.com
Error Handling patterns Big Outer Try Block Hide Technical Detail from Users Log at Distribution Log Unexpected Boundary Errors Unique Error Split Domain and Make Exceptions Identifier Technical errors Exceptional
Error Handling Patterns
plit Domain and Technical Errors domain errors'' are due to errors in the business logic or business processing(e. g. wrong type of customer for insurance policy) technical errors", are caused by problems in the underlying platform(e.g, could not connect to database)or by unexpected faults(e.g. divide by zero e Handling technical errors in domain code makes this code more obscure and difficult to maintain
Split Domain and Technical Errors “domain errors”, are due to errors in the business logic or business processing (e.g. wrong type of customer for insurance policy). “technical errors”, are caused by problems in the underlying platform (e.g. could not connect to database) or by unexpected faults (e.g. divide by zero). Handling technical errors in domain code makes this code more obscure and difficult to maintain
e Solution Split domain and technical error handling Create separate exception/error hierarchies and handle at different points and in different ways as approprlate
Solution Split domain and technical error handling. Create separate exception/error hierarchies and handle at different points and in different ways as appropriate
Domain Exception System exception CustomerNotFound Exception InsufficientFunds Exception Transaction Refused Exception