x
 
<!DOCTYPE html>
<html>
<body>
<?php
try {
  try {
    throw new Exception("发生了一个错误", 1);
  } catch(Exception $e1) {
    throw new Exception("另一个错误发生了", 2, $e1);
  }
} catch (Exception $e2) {
  echo $previous = $e2->getPrevious();
  echo $previous->getMessage();
}
?>
</body>
</html>