00001 <?php
00006
00007 define("JERROR_DEFAULT", 0);
00008
00016 class JError
00017 {
00018 var $code;
00019 var $msg;
00020 var $type;
00021 var $extra;
00022
00028 function JError($code, $msg, $type=JERROR_DEFAULT, $extra=null)
00029 {
00030 $this->code = $code;
00031 $this->msg = $msg;
00032 $this->type = $type;
00033 $this->extra = $extra;
00034 }
00035
00040 function GetCode()
00041 {
00042 return $this->code;
00043 }
00044
00049 function GetMessage()
00050 {
00051 return $this->msg;
00052 }
00053
00058 function GetType()
00059 {
00060 return $this->type;
00061 }
00062
00067 function GetExtraInfo()
00068 {
00069 return $this->extra;
00070 }
00071
00076 function ToString()
00077 {
00078 if ($this->msg == "")
00079 $msg = gettext("Error code: ").$this->GetCode();
00080 else
00081 $msg = $this->msg;
00082
00083 return $msg;
00084 }
00085 }
00086 ?>