Fixing E_NOTICE
[lhc/web/wiklou.git] / includes / WikiError.php
index 1b3f7f0..b155f9b 100644 (file)
@@ -24,6 +24,7 @@
 /**
  * Since PHP4 doesn't have exceptions, here's some error objects
  * loosely modeled on the standard PEAR_Error model...
+ * @addtogroup Exception
  */
 class WikiError {
        /**
@@ -64,6 +65,7 @@ class WikiError {
 
 /**
  * Localized error message object
+ * @addtogroup Exception
  */
 class WikiErrorMsg extends WikiError {
        /**
@@ -79,6 +81,7 @@ class WikiErrorMsg extends WikiError {
 
 /**
  * @todo document
+ * @addtogroup Exception
  */
 class WikiXmlError extends WikiError {
        /**
@@ -98,12 +101,12 @@ class WikiXmlError extends WikiError {
 
        /** @return string */
        function getMessage() {
-               return sprintf( '%s at line %d, col %d (byte %d%s): %s',
+               // '$1 at line $2, col $3 (byte $4): $5',
+               return wfMsgHtml( 'xml-error-string',
                        $this->mMessage,
                        $this->mLine,
                        $this->mColumn,
-                       $this->mByte,
-                       $this->mContext,
+                       $this->mByte . $this->mContext,
                        xml_error_string( $this->mXmlError ) );
        }
 
@@ -117,5 +120,3 @@ class WikiXmlError extends WikiError {
                }
        }
 }
-
-?>