protected function getErrorDetails(\Exception $e, $trace = false)
    {
        $msg = $e->getMessage();
        if ($e instanceof DfException) {
            $context = $e->getContext();
            if (is_array($context)) {
                $context = print_r($context, true);
            }
            if (!empty($context)) {
                $msg .= "\nContext: " . $context;
            }
        }

        if ($trace === true) {
            $msg .= "\nTrace:\n" . $e->getTraceAsString();
        }

        return $msg;
    }
protected function getErrorDetails(\Exception $e, $trace = false)
    {
        $msg = $e->getMessage();
        if ($e instanceof DfException) {
            $context = $e->getContext();
            if (is_array($context)) {
                $context = print_r($context, true);
            }
            if (!empty($context)) {
                $msg .= "\nContext: " . $context;
            }
        }

        if ($trace === true) {
            $msg .= "\nTrace:\n" . $e->getTraceAsString();
        }

        return $msg;
    }
protected function getErrorDetails ( \ Exception $ e , $ trace = false ) { $ msg = $ e -> getMessage ( ) ; if ( $ e instanceof DfException ) { $ context = $ e -> getContext ( ) ; if ( is_array ( $ context ) ) { $ context = print_r ( $ context , true ) ; } if ( ! empty ( $ context ) ) { $ msg .= "\nContext: " . $ context ; } } if ( $ trace === true ) { $ msg .= "\nTrace:\n" . $ e -> getTraceAsString ( ) ; } return $ msg ; }
Returns details from exception.

@param \Exception $e
@param bool       $trace

@return string
Returns details from exception .