21,887
社区成员
发帖
与我相关
我的任务
分享
class aaException extends Exception{
public function errorMessage()
{
$error="fuuuuuuuck";
return $error;
}
}
try{
$m=exec("python 2.py");
print "hello";
if(!$m){
throw new Exception("failed1111");
}
$n=exec("python 1.py");
if(!$n){
throw new aaException("ffffaaaa");
}
}
catch(Exception $e){
echo $e->getmessage();
}
catch(aaException $e){
echo $e->errorMessage();
}