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
}
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
}
try {
try {
// some code
}
catch (App_Exception $e) {
// do sth.
throw $e;
}
}
catch (Exception $e) {
// do the same exception code again
}