File tree 2 files changed +21
-0
lines changed
2 files changed +21
-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
+ {
7
+ protected $ internalDontReport = [];
8
+
9
+ public function register (): void
10
+ {
11
+ $ this ->reportable (function (\Throwable $ e ) {
12
+ error_log ('[NATIVE_EXCEPTION]: ' .$ e ->getMessage ());
13
+ });
14
+ }
15
+ }
Original file line number Diff line number Diff line change 11
11
use Native \Laravel \Commands \MinifyApplicationCommand ;
12
12
use Native \Laravel \Commands \SeedDatabaseCommand ;
13
13
use Native \Laravel \Events \EventWatcher ;
14
+ use Native \Laravel \Exceptions \Handler ;
14
15
use Native \Laravel \Logging \LogWatcher ;
15
16
use Spatie \LaravelPackageTools \Package ;
16
17
use Spatie \LaravelPackageTools \PackageServiceProvider ;
@@ -44,6 +45,11 @@ public function packageRegistered()
44
45
return new MigrateCommand ($ app ['migrator ' ], $ app ['events ' ]);
45
46
});
46
47
48
+ $ this ->app ->singleton (
49
+ \Illuminate \Contracts \Debug \ExceptionHandler::class,
50
+ Handler::class
51
+ );
52
+
47
53
if (config ('nativephp-internal.running ' )) {
48
54
Artisan::starting (function ($ artisan ) {
49
55
$ artisan ->resolveCommands ([
You can’t perform that action at this time.
0 commit comments