Best practices in production level exception handling in java applications

Page 1

Best Practices in Production Level Exception Handling In Java Applications

What is happening in exceptional handling at production level due to the presently prevalent coding style? Ideally, code sent to production servers as the final build of the version should be totally bug free. That is not possible in real-world applications. Also, exceptions do not necessarily occur only due to bugs. A temporary system failure, an uncaught null pointer exception, and other such cases can also lead to exceptions. In a typical DevOps setting, we have come to love our logs. Where exceptions should be well, exceptions that occur only in the most ‘lost cause’ scenarios that disrupt the normal functioning of the Java application. However, because of our love for the written record, we write logs for even the most trivial exceptions. This leads to a lot of noise in the operational logs, which can often bury the really serious exceptions as a mere statistical figure. Unless the exception occurs a significant number of times in a short time window, say a 1000 users not able to checkout a cart


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.