mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-02-11 10:09:24 +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) {
|
||||
$debugging = $e->getPrevious() ?: $e;
|
||||
$result['trace'] = static::toSafeTrace($debugging->getTrace());
|
||||
$isTrivial = $e instanceof Error && !$e->getPrevious();
|
||||
|
||||
if (!$isTrivial) {
|
||||
$debugging = $e->getPrevious() ?: $e;
|
||||
$result['trace'] = static::toSafeTrace($debugging->getTrace());
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user