Domain/DomainUtil.php
protected static function extractDriverExceptionMessage(DriverException $exception, $message, $debug = false)
    {
        if ($debug && null !== $exception->getPrevious()) {
            $prevMessage = static::getFirstException($exception)->getMessage();
            $pos = strpos($prevMessage, ':');

            if ($pos > 0 && 0 === strpos($prevMessage, 'SQLSTATE[')) {
                $message .= ': '.trim(substr($prevMessage, $pos + 1));
            }
        }

        return $message;
    }
protected static function extractDriverExceptionMessage(DriverException $exception, $message, $debug = false)
    {
        if ($debug && null !== $exception->getPrevious()) {
            $prevMessage = static::getFirstException($exception)->getMessage();
            $pos = strpos($prevMessage, ':');

            if ($pos > 0 && 0 === strpos($prevMessage, 'SQLSTATE[')) {
                $message .= ': '.trim(substr($prevMessage, $pos + 1));
            }
        }

        return $message;
    }
protected static function extractDriverExceptionMessage ( DriverException $ exception , $ message , $ debug = false ) { if ( $ debug && null !== $ exception -> getPrevious ( ) ) { $ prevMessage = static :: getFirstException ( $ exception ) -> getMessage ( ) ; $ pos = strpos ( $ prevMessage , ':' ) ; if ( $ pos > 0 && 0 === strpos ( $ prevMessage , 'SQLSTATE[' ) ) { $ message .= ': ' . trim ( substr ( $ prevMessage , $ pos + 1 ) ) ; } } return $ message ; }
Format pdo driver exception.

@param DriverException $exception The exception
@param string          $message   The message
@param bool            $debug     The debug mode

@return string
Format pdo driver exception .