Allow dumping of errors and warnings (#14275)

`lnms config:set reporting.error.dump true`
This commit is contained in:
Tony Murray
2022-09-03 20:57:26 -05:00
committed by GitHub
parent 842c454e7b
commit 152bf6e8de
2 changed files with 12 additions and 4 deletions

View File

@@ -46,6 +46,10 @@ class ErrorReportingProvider extends \Facade\Ignition\IgnitionServiceProvider
public function boot(): void
{
Flare::filterExceptionsUsing(function (\Exception $e) {
if (Config::get('reporting.error.dump')) {
dump('Exception: ' . $e->getMessage(), $e->getFile() . ':' . $e->getLine());
}
return $this->isReportingEnabled();
});

View File

@@ -4853,6 +4853,14 @@
"git": "Git"
}
},
"reporting.error": {
"default": false,
"type": "boolean"
},
"reporting.error.dump": {
"default": false,
"type": "boolean"
},
"rewrite_if": {
"type": "array"
},
@@ -5611,10 +5619,6 @@
"section": "smokeping",
"order": 3,
"type": "text"
},
"reporting.error": {
"default": false,
"type": "boolean"
}
}
}