I just want to confirm my understanding of exceptions and how they impact their objects.
If I throw an exception, that halts the processing of a method, correct? So there's no point in doing
if ( some_check() ) {
throw new Exception(...);
} else {
...
}
I should just do this
if ( some_check() ) {
throw new Exception(...);
}
rest_of_code();
Also, if I throw an exception in __construct, that destroys the object, right? So I should do all my argument validation exception-throwing right up front -- there's no point in building the object if it's gonna get blown up anyway in an input validation exception.