public static function parseThrowableMessage($ex)
    {
        $message = $ex['message'];

        if ($ex['isError'] && strpos($message, ' in ') !== false)
        {
            $message = preg_replace('#([a-zA-Z0-9-_]+?)/#siU', '', $message);
            $message = preg_replace('#/#si', '', $message, 1);
        }
        else
        {
            $message = trim($message, '"');
            $file = str_replace('.php', '', basename($ex['file']));
            $line = $ex['line'];
            $message = '"' . $message . '" in ' . $file . ':' . $line;
        }

        return '[' . static::getBasename($ex['class']) . '] ' . $message;
    }
public static function parseThrowableMessage($ex)
    {
        $message = $ex['message'];

        if ($ex['isError'] && strpos($message, ' in ') !== false)
        {
            $message = preg_replace('#([a-zA-Z0-9-_]+?)/#siU', '', $message);
            $message = preg_replace('#/#si', '', $message, 1);
        }
        else
        {
            $message = trim($message, '"');
            $file = str_replace('.php', '', basename($ex['file']));
            $line = $ex['line'];
            $message = '"' . $message . '" in ' . $file . ':' . $line;
        }

        return '[' . static::getBasename($ex['class']) . '] ' . $message;
    }
public static function parseThrowableMessage ( $ ex ) { $ message = $ ex [ 'message' ] ; if ( $ ex [ 'isError' ] && strpos ( $ message , ' in ' ) !== false ) { $ message = preg_replace ( '#([a-zA-Z0-9-_]+?)/#siU' , '' , $ message ) ; $ message = preg_replace ( '#/#si' , '' , $ message , 1 ) ; } else { $ message = trim ( $ message , '"' ) ; $ file = str_replace ( '.php' , '' , basename ( $ ex [ 'file' ] ) ) ; $ line = $ ex [ 'line' ] ; $ message = '"' . $ message . '" in ' . $ file . ':' . $ line ; } return '[' . static :: getBasename ( $ ex [ 'class' ] ) . '] ' . $ message ; }
Parse Throwable message to proper format.

@param string[] $ex
@return string
Parse Throwable message to proper format .