File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Native \Laravel \Exceptions ;
4+
5+ class Handler extends \Illuminate \Foundation \Exceptions \Handler {
6+ protected $ internalDontReport = [];
7+
8+ public function register (): void
9+ {
10+ $ this ->reportable (function (\Throwable $ e ) {
11+ error_log ('[NATIVE_EXCEPTION]: ' .$ e ->getMessage ());
12+ });
13+ }
14+ }
Original file line number Diff line number Diff line change 1111use Native \Laravel \Commands \MinifyApplicationCommand ;
1212use Native \Laravel \Commands \SeedDatabaseCommand ;
1313use Native \Laravel \Events \EventWatcher ;
14+ use Native \Laravel \Exceptions \Handler ;
1415use Native \Laravel \Logging \LogWatcher ;
1516use Spatie \LaravelPackageTools \Package ;
1617use Spatie \LaravelPackageTools \PackageServiceProvider ;
@@ -44,6 +45,11 @@ public function packageRegistered()
4445 return new MigrateCommand ($ app ['migrator ' ], $ app ['events ' ]);
4546 });
4647
48+ $ this ->app ->singleton (
49+ \Illuminate \Contracts \Debug \ExceptionHandler::class,
50+ Handler::class
51+ );
52+
4753 if (config ('nativephp-internal.running ' )) {
4854 Artisan::starting (function ($ artisan ) {
4955 $ artisan ->resolveCommands ([
You can’t perform that action at this time.
0 commit comments