I am designing a custom Exception class for my application. I have a very basic question. Should I extend from Exception class or Thowable class ? What are the benefits ?
I intend to throw this from underlying layers and catch it in the top level classes. Will it influence my decision of using Thowable over Exception. Is it fundamentally right to catch a Thowable ?
I 've gone through some other threads in this forum. They talk about having the stack trace maintained when it is thrown and not having it for exception etc. I understand that some say ( here) that Thowable is super class of Exception and we should not use it. But others (here) say Exception is for "Exceptional " cases.
This question is rather a discussion of how one is better than other rather than asking how.