protected function getErrorMessage(Exception $exception)
    {
        $defaultMessage =  __('Unexpected error. Please contact administrator');
        if (DEBUG_MODE) {
            $defaultMessage = $exception->getMessage();
        }
        return ($exception instanceof common_exception_UserReadableException) ? $exception->getUserMessage() :  $defaultMessage;
    }
protected function getErrorMessage(Exception $exception)
    {
        $defaultMessage =  __('Unexpected error. Please contact administrator');
        if (DEBUG_MODE) {
            $defaultMessage = $exception->getMessage();
        }
        return ($exception instanceof common_exception_UserReadableException) ? $exception->getUserMessage() :  $defaultMessage;
    }
protected function getErrorMessage ( Exception $ exception ) { $ defaultMessage = __ ( 'Unexpected error. Please contact administrator' ) ; if ( DEBUG_MODE ) { $ defaultMessage = $ exception -> getMessage ( ) ; } return ( $ exception instanceof common_exception_UserReadableException ) ? $ exception -> getUserMessage ( ) : $ defaultMessage ; }
Generate safe message preventing exposing sensitive date in non develop mode
@param Exception $exception
@return string
Generate safe message preventing exposing sensitive date in non develop mode