「Php/カスタムexception」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「==サンプル== function exception_handler($exception) { echo "Uncaught exception: " , $exception->getMessage(), "\n"; mail( "hoge@example.com", $except...」) |
(相違点なし)
|
2015年5月20日 (水) 03:10時点における最新版
サンプル
function exception_handler($exception) { echo "Uncaught exception: " , $exception->getMessage(), "\n"; mail( "hoge@example.com", $exception->getMessage(), $exception->__toString() ); } set_exception_handler('exception_handler'); throw new Exception('Uncaught Exception'); echo "Not Executed\n";