src/Api/Response/RestResponseBuilder.php
protected function formatExceptionError(Exception $e, $fallbackMessage = null)
    {
        if (    (config('app.debug') || $this->core->config('debug'))
            &&  $this->core->apiConfig('debug.local-exception-trace', true)
        ) {
            return $this->formatExceptionErrorForLocal($e, $fallbackMessage);
        }

        $message = $e->getMessage() ?: $fallbackMessage;

        return [
            'message' => $message,
        ];
    }
protected function formatExceptionError(Exception $e, $fallbackMessage = null)
    {
        if (    (config('app.debug') || $this->core->config('debug'))
            &&  $this->core->apiConfig('debug.local-exception-trace', true)
        ) {
            return $this->formatExceptionErrorForLocal($e, $fallbackMessage);
        }

        $message = $e->getMessage() ?: $fallbackMessage;

        return [
            'message' => $message,
        ];
    }
protected function formatExceptionError ( Exception $ e , $ fallbackMessage = null ) { if ( ( config ( 'app.debug' ) || $ this -> core -> config ( 'debug' ) ) && $ this -> core -> apiConfig ( 'debug.local-exception-trace' , true ) ) { return $ this -> formatExceptionErrorForLocal ( $ e , $ fallbackMessage ) ; } $ message = $ e -> getMessage ( ) ? : $ fallbackMessage ; return [ 'message' => $ message , ] ; }
Formats an exception as a standardized error response.

@param Exception   $e
@param null|string $fallbackMessage  message to use if exception has none
@return mixed
Formats an exception as a standardized error response .