function _raiseError($id, $info = array())
    {
        $code = $this->errorCode[$id]['code'];
        $msg = $this->errorCode[$id]['msg'];

        // include info to messages
        if (!empty($info)) {
            $search = array();
            $replace = array();

            foreach ($info as $key => $value) {
                array_push($search, '{' . strtoupper($key) . '}');
                array_push($replace, $value);
            }

            $msg = str_replace($search, $replace, $msg);
        }

        return PEAR::raiseError($msg, $code);
    }
function _raiseError($id, $info = array())
    {
        $code = $this->errorCode[$id]['code'];
        $msg = $this->errorCode[$id]['msg'];

        // include info to messages
        if (!empty($info)) {
            $search = array();
            $replace = array();

            foreach ($info as $key => $value) {
                array_push($search, '{' . strtoupper($key) . '}');
                array_push($replace, $value);
            }

            $msg = str_replace($search, $replace, $msg);
        }

        return PEAR::raiseError($msg, $code);
    }
function _raiseError ( $ id , $ info = array ( ) ) { $ code = $ this -> errorCode [ $ id ] [ 'code' ] ; $ msg = $ this -> errorCode [ $ id ] [ 'msg' ] ; // include info to messages if ( ! empty ( $ info ) ) { $ search = array ( ) ; $ replace = array ( ) ; foreach ( $ info as $ key => $ value ) { array_push ( $ search , '{' . strtoupper ( $ key ) . '}' ) ; array_push ( $ replace , $ value ) ; } $ msg = str_replace ( $ search , $ replace , $ msg ) ; } return PEAR :: raiseError ( $ msg , $ code ) ; }
raise standardized error

include additional information in error message

@access private
@param string $id maps error ids to codes and message
@param array $info optional information in associative array
@see _errorCode
raise standardized error