mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 04:37:38 +02:00
Add SoapFault details to formatted exception
This commit is contained in:
@@ -170,7 +170,22 @@ class LineFormatter extends NormalizerFormatter
|
||||
|
||||
private function formatException(\Throwable $e): string
|
||||
{
|
||||
$str = '[object] (' . Utils::getClass($e) . '(code: ' . $e->getCode() . '): ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . ')';
|
||||
$str = '[object] (' . Utils::getClass($e) . '(code: ' . $e->getCode();
|
||||
if ($e instanceof \SoapFault) {
|
||||
if (isset($e->faultcode)) {
|
||||
$str .= ' faultcode: ' . $e->faultcode;
|
||||
}
|
||||
|
||||
if (isset($e->faultactor)) {
|
||||
$str .= ' faultactor: ' . $e->faultactor;
|
||||
}
|
||||
|
||||
if (isset($e->detail)) {
|
||||
$str .= ' detail: ' . $e->detail;
|
||||
}
|
||||
}
|
||||
$str .= '): ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . ')';
|
||||
|
||||
if ($this->includeStacktraces) {
|
||||
$str .= "\n[stacktrace]\n" . $e->getTraceAsString() . "\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user