diff options
author | Andrew Dolgov <[email protected]> | 2006-03-31 06:18:55 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-03-31 06:18:55 +0100 |
commit | af106b0ebe0b34189a83bbfb64e9c9ace044a273 (patch) | |
tree | 821e7cefa3f9011626bc51a34bc7209c445e1036 /functions.php | |
parent | 6e7f8d269e3c84807072607edc765d6c0f72712c (diff) |
better fatal error handling by frontend (remove error.php)
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/functions.php b/functions.php index 14d9fa154..d4feaf5d6 100644 --- a/functions.php +++ b/functions.php @@ -9,6 +9,7 @@ require_once 'config.php'; require_once 'db-prefs.php'; require_once 'compat.php'; + require_once 'errors.php'; require_once 'magpierss/rss_utils.inc'; @@ -1498,4 +1499,15 @@ return $version[1]; } + function print_error_xml($code, $add_msg = "") { + global $ERRORS; + + $error_msg = $ERRORS[$code]; + + if ($add_msg) { + $error_msg = "$error_msg; $add_msg"; + } + + print "<error error-code=\"$code\" error-msg=\"$error_msg\"/>"; + } ?> |