【php开源代码栏目提醒】:本文主要为网学会员提供basic_exception.php,希望对需要basic_exception.php网友有所帮助,学习一下!
<?php
try
{
throw new Exception('A terrible error has occurred', 42);
}
catch (Exception $e)
{
echo 'Exception '. $e->getCode(). ': '. $e->getMessage().'<br />'
.' in '. $e->getFile(). ' on line '. $e->getLine(). '<br />';
}
?>