Domain/DomainUtil.php
public static function getExceptionMessage(TranslatorInterface $translator, \Exception $exception, $debug = false)
    {
        $message = $translator->trans('domain.database_error', [], 'FxpResource');

        if ($debug) {
            $message .= ' ['.\get_class($exception).']';
        }

        if ($exception instanceof DriverException) {
            return static::extractDriverExceptionMessage($exception, $message, $debug);
        }

        return $debug
            ? $exception->getMessage()
            : $message;
    }
public static function getExceptionMessage(TranslatorInterface $translator, \Exception $exception, $debug = false)
    {
        $message = $translator->trans('domain.database_error', [], 'FxpResource');

        if ($debug) {
            $message .= ' ['.\get_class($exception).']';
        }

        if ($exception instanceof DriverException) {
            return static::extractDriverExceptionMessage($exception, $message, $debug);
        }

        return $debug
            ? $exception->getMessage()
            : $message;
    }
public static function getExceptionMessage ( TranslatorInterface $ translator , \ Exception $ exception , $ debug = false ) { $ message = $ translator -> trans ( 'domain.database_error' , [ ] , 'FxpResource' ) ; if ( $ debug ) { $ message .= ' [' . \ get_class ( $ exception ) . ']' ; } if ( $ exception instanceof DriverException ) { return static :: extractDriverExceptionMessage ( $ exception , $ message , $ debug ) ; } return $ debug ? $ exception -> getMessage ( ) : $ message ; }
Get the exception message.

@param TranslatorInterface $translator The translator
@param \Exception          $exception  The exception
@param bool                $debug      The debug mode

@return string
Get the exception message .