Skip to content

Instantly share code, notes, and snippets.

@nazo
Created May 18, 2015 04:05
Show Gist options
  • Save nazo/f5859ee3334c6da09041 to your computer and use it in GitHub Desktop.
Save nazo/f5859ee3334c6da09041 to your computer and use it in GitHub Desktop.
[php][laravel5]例外の内容をログに出力

ほっといたら例外はログに出るんだけど、例えばログには吐きたいけどcatchしてプログラムを終了させたくない時は、

try {
} catch(FooException $e) {
   \App::make('Illuminate\Contracts\Debug\ExceptionHandler')->report($e);
   // ...
}

とすればいい。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment