mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 21:06:05 +03:00
Do not output trace for trivial errors even in debug mode
This commit is contained in:
parent
3e6f2c9e83
commit
e7838d2253
@ -91,8 +91,12 @@ class FormattedError
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($debug & self::INCLUDE_TRACE > 0) {
|
if ($debug & self::INCLUDE_TRACE > 0) {
|
||||||
$debugging = $e->getPrevious() ?: $e;
|
$isTrivial = $e instanceof Error && !$e->getPrevious();
|
||||||
$result['trace'] = static::toSafeTrace($debugging->getTrace());
|
|
||||||
|
if (!$isTrivial) {
|
||||||
|
$debugging = $e->getPrevious() ?: $e;
|
||||||
|
$result['trace'] = static::toSafeTrace($debugging->getTrace());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user