diff options
author | Ben Coburn <btcoburn@silicodon.net> | 2006-04-09 06:55:46 +0200 |
---|---|---|
committer | Ben Coburn <btcoburn@silicodon.net> | 2006-04-09 06:55:46 +0200 |
commit | c19c91735c84cbf928b8a7717a4701fdc22b27ce (patch) | |
tree | 39aa8817d39a647c60b2d1b42a169993b6347819 /inc/parserutils.php | |
parent | cd7fd4a2c78ff5083a121a441142649ab5f6acad (diff) | |
download | rpg-c19c91735c84cbf928b8a7717a4701fdc22b27ce.tar.gz rpg-c19c91735c84cbf928b8a7717a4701fdc22b27ce.tar.bz2 |
cleanup export mode errors
- Using the export modes 'handler', 'lexer', 'parser', or 'renderer'
now produces a nicer non-fatal error.
- The export mode 'wiki' is now ignored to avoid fatal errors.
darcs-hash:20060409045546-05dcb-89f4c56c23d9798f4cb2dd000804cb8c03524b6d.gz
Diffstat (limited to 'inc/parserutils.php')
-rw-r--r-- | inc/parserutils.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/parserutils.php b/inc/parserutils.php index 45847d929..13c9396a0 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -345,6 +345,8 @@ function p_sort_modes($a, $b){ function p_render($mode,$instructions,& $info){ if(is_null($instructions)) return ''; + if ($mode=='wiki') { msg("Renderer for $mode not valid",-1); return null; } //FIXME!! remove this line when inc/parser/wiki.php works. + // Create the renderer if(!@file_exists(DOKU_INC."inc/parser/$mode.php")){ msg("No renderer for $mode found",-1); @@ -354,7 +356,9 @@ function p_render($mode,$instructions,& $info){ require_once DOKU_INC."inc/parser/$mode.php"; $rclass = "Doku_Renderer_$mode"; if ( !class_exists($rclass) ) { - trigger_error("Unable to resolve render class $rclass",E_USER_ERROR); + trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); + msg("Renderer for $mode not valid",-1); + return null; } $Renderer = & new $rclass(); #FIXME any way to check for class existance? |