Table of contents ▼▲
Error Handling
I have designed the error handling to be flexible and extenible.- You can add your own error files for any add-on scripts you write.
- Local language versions can also be added.
The default settings for error messages are:{{nocamelcaselinks}}
$ErrorDir = "code/msgfiles";
$ErrorLanguage = "en";
$ErrorFile = "wikidx_msg.xml";
When calling the error class, use the three methods UseFile(), UseDir(), and UseLang() to set to your liking..
$cError = new clsError();
$cError->UseFile("upload_msg.xml"
;
$cError->ErrMsg("upl001"
As usual, the defaults can be overwritten in custom.php files.
To create other langauges, create a new langauge file (in new directory), ie
code/msgfiles/fr/wikidx_msg.xml and change the variable $ErrorLang to the directory ie en, or fr.
If you do create a different langauge version, please post back to the home of WikiD-X, so I can include it in future releases.