Java Global Exception Handler
<p>I have a question regarding the exception handler.
I have a structured code for my project which has many packages and classes for different purposes.
In this code, there are many places where I try to catch different types of exceptions. 
To mention a few of them are <code>SAXException</code>, <code>IOException</code>, <code>NumberFormatException</code>, <code>ParserConfigurationException</code>, <code>RuntimeException</code> and so on.</p>

<p>In all the cases where I catch the exceptions, I only print a stack trace. The moment I come across an exception, I will figure out from the stack trace the function where it occurred and fix it accordingly. I don't do anything else with the exception, neither I intend to do, since the code size is not huge and fairly easy to debug for me. </p>

<p>Now, I am using an external java library which is provided by a third-party developer. This library throws exception for every possible function that I call. I am trying to write a wrapper over this library in order to utilise it. However, I find try/catch blocks everywhere in my code, due to this library. </p>

<p>For example my code looks like this - </p>

<pre><code>Class Wrapper
{
     public void method1()
     { 
         ....
         try
         {
            ...
            third party library calls...
            ... 
         } catch (Exception e) { e.printStackTrace(); }

     }

     public void method2()
     { 
         ....
         try
         {
            ...
            third party library calls...
            ... 
         } catch (Exception e) { e.printStackTrace(); }

     }
     // ... and so on... there are 50-100 methods like this.
     // some are even one-liners.
}
</code></pre>

<p>Given this scenario, should I switch to Global Exception handler as mentioned in <a href="http://stackoverflow.com/questions/1548487/java-global-exception-handler">this discussion</a>?</p>

<p>Will this avoid write try/catch blocks everywhere in my code?</p>

<p>Also, should I remove the existing try/catch blocks?</p>

<p>Thanks!</p>
