我可以在PHP中合并两个捕获吗?
try {
// some code
}
catch (App_Exception $e) {
// do sth.
}
catch (Exception $e) {
// do the same exception code again
}
答案 0 :(得分:0)
try {
try {
// some code
}
catch (App_Exception $e) {
// do sth.
throw $e;
}
}
catch (Exception $e) {
// do the same exception code again
}