mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-24 22:06:04 +03:00
Check if an exception is internal before rethrowing
This commit is contained in:
parent
ec54d6152b
commit
503ac4619a
@ -235,7 +235,9 @@ class FormattedError
|
||||
|
||||
$debug = (int) $debug;
|
||||
|
||||
if ($debug & Debug::RETHROW_INTERNAL_EXCEPTIONS) {
|
||||
$isInternal = ! $e instanceof ClientAware || ! $e->isClientSafe();
|
||||
|
||||
if (($debug & Debug::RETHROW_INTERNAL_EXCEPTIONS) && $isInternal) {
|
||||
if (! $e instanceof Error) {
|
||||
throw $e;
|
||||
}
|
||||
@ -245,8 +247,6 @@ class FormattedError
|
||||
}
|
||||
}
|
||||
|
||||
$isInternal = ! $e instanceof ClientAware || ! $e->isClientSafe();
|
||||
|
||||
if (($debug & Debug::INCLUDE_DEBUG_MESSAGE) && $isInternal) {
|
||||
// Displaying debugMessage as a first entry:
|
||||
$formattedError = ['debugMessage' => $e->getMessage()] + $formattedError;
|
||||
|
Loading…
Reference in New Issue
Block a user