x
 
<!DOCTYPE html>
<html>
<body>
<?php
try {
  throw new Exception("发生了一个错误", 120);
} catch(Exception $e) {
  echo "Error code: " . $e->getCode();
}
?>
</body>
</html>