I'm just trying to understand this a little better.
I understand there are many different exception types, and according to some reading I've done, all exception types are caught by Exception. First of all, can I be assured that this is true?
try{
...
}
catch(Exception x){
//No matter what fails in the try block, x
//will always have a value since all exception
//types are caught under Exception? I guess
//What I really want to know, is will this ever
//Fail?
}
catch(SystemException x){
//This code will never execute since all
//exceptions are caught in the first catch?
}
Next, how does this catching hierarchy work? If Exception is at the top, is every other exception type one level under Exception, or are there multiple type tiers, like if Exception is the parent of ExceptionSomething, which is the parent of ExceptionSomethingElse?
addendum:
Or if we have code like this:
try{
...
}
catch(SystemException x){
//If there is an exception that is not a SystemException
//code in this block will not run, right (since this is
//looking specifically for SystemExceptions)?
}