tags:

views:

40

answers:

1

Could I merge two catches in PHP?

try {
  // some code
}
catch (App_Exception $e) {
  // do sth.
}
catch (Exception $e) {
  // do the same exception code again
}
A: 
try {
    try {
        // some code
    }
    catch (App_Exception $e) {
        // do sth.
        throw $e;
    }
}
catch (Exception $e) {
    // do the same exception code again
}
David Barnes
I don't get how this changes the behavior at all though?
Josh Ribakoff