protected function _errorMessage($objectEncoding, $message, $description, $detail, $code, $line)
    {
        $return = null;
        switch ($objectEncoding) {
            case Zend_Amf_Constants::AMF0_OBJECT_ENCODING :
                return array (
                        'description' => ($this->isProduction ()) ? '' : $description,
                        'detail' => ($this->isProduction ()) ? '' : $detail,
                        'line' => ($this->isProduction ()) ? 0 : $line,
                        'code' => $code
                );
            case Zend_Amf_Constants::AMF3_OBJECT_ENCODING :
                require_once 'Zend/Amf/Value/Messaging/ErrorMessage.php';
                $return = new Zend_Amf_Value_Messaging_ErrorMessage ( $message );
                $return->faultString = $this->isProduction () ? '' : $description;
                $return->faultCode = $code;
                $return->faultDetail = $this->isProduction () ? '' : $detail;
                break;
        }
        return $return;
    }
protected function _errorMessage($objectEncoding, $message, $description, $detail, $code, $line)
    {
        $return = null;
        switch ($objectEncoding) {
            case Zend_Amf_Constants::AMF0_OBJECT_ENCODING :
                return array (
                        'description' => ($this->isProduction ()) ? '' : $description,
                        'detail' => ($this->isProduction ()) ? '' : $detail,
                        'line' => ($this->isProduction ()) ? 0 : $line,
                        'code' => $code
                );
            case Zend_Amf_Constants::AMF3_OBJECT_ENCODING :
                require_once 'Zend/Amf/Value/Messaging/ErrorMessage.php';
                $return = new Zend_Amf_Value_Messaging_ErrorMessage ( $message );
                $return->faultString = $this->isProduction () ? '' : $description;
                $return->faultCode = $code;
                $return->faultDetail = $this->isProduction () ? '' : $detail;
                break;
        }
        return $return;
    }
protected function _errorMessage ( $ objectEncoding , $ message , $ description , $ detail , $ code , $ line ) { $ return = null ; switch ( $ objectEncoding ) { case Zend_Amf_Constants :: AMF0_OBJECT_ENCODING : return array ( 'description' => ( $ this -> isProduction ( ) ) ? '' : $ description , 'detail' => ( $ this -> isProduction ( ) ) ? '' : $ detail , 'line' => ( $ this -> isProduction ( ) ) ? 0 : $ line , 'code' => $ code ) ; case Zend_Amf_Constants :: AMF3_OBJECT_ENCODING : require_once 'Zend/Amf/Value/Messaging/ErrorMessage.php' ; $ return = new Zend_Amf_Value_Messaging_ErrorMessage ( $ message ) ; $ return -> faultString = $ this -> isProduction ( ) ? '' : $ description ; $ return -> faultCode = $ code ; $ return -> faultDetail = $ this -> isProduction ( ) ? '' : $ detail ; break ; } return $ return ; }
Create appropriate error message

@param int $objectEncoding Current AMF encoding
@param string $message Message that was being processed when error happened
@param string $description Error description
@param mixed $detail Detailed data about the error
@param int $code Error code
@param int $line Error line
@return Zend_Amf_Value_Messaging_ErrorMessage|array
Create appropriate error message