Delete comment from: Javarevisited
manju said...
I want to add some more information to the point 7.
Exceptions in java are slow because of the time taken to fill the stack trace to the exception object. Time taken for Creating an exception object , Throwing an object and Catching an object is comparatively less compared to filling the stack trace to the exception object. We can avoid filling stack trace by creating an custom exception which overrides fillInStackTrace method of the Throwable class . These are Cheap Exceptions and can be used for flow control(although not advised) in some particular situations.
Aug 17, 2014, 1:13:30 AM
Posted to 10 Exception handling Best Practices in Java Programming