diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-02-25 21:15:43 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-02-25 21:15:43 +0000 |
commit | f3283f02766b2a2730b81c5a5a0b0a6240af054c (patch) | |
tree | 70cf494f0f2321aabc91dd4e2cb93c36d7c4da34 | |
parent | 5b76ad9103ca8e25d29c5ce018859be6679b7b1c (diff) | |
download | rpg-f3283f02766b2a2730b81c5a5a0b0a6240af054c.tar.gz rpg-f3283f02766b2a2730b81c5a5a0b0a6240af054c.tar.bz2 |
change to an Exception and expect it
-rw-r--r-- | _test/tests/inc/parserutils_get_renderer.test.php | 4 | ||||
-rw-r--r-- | inc/parserutils.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/_test/tests/inc/parserutils_get_renderer.test.php b/_test/tests/inc/parserutils_get_renderer.test.php index 0f373227d..540063e19 100644 --- a/_test/tests/inc/parserutils_get_renderer.test.php +++ b/_test/tests/inc/parserutils_get_renderer.test.php @@ -45,6 +45,10 @@ class parserutils_get_renderer_test extends DokuWikiTest { } // test fallback fails + /** + * @expectedException Exception + * @expectedExceptionCode E_USER_WARNING + */ function test_p_get_renderer_fallback_fail() { global $conf; diff --git a/inc/parserutils.php b/inc/parserutils.php index c12732e88..1c628a766 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -665,7 +665,7 @@ function p_get_renderer($mode) { } // fallback failed, alert the world - trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); + throw new Exception("Unable to resolve render class $rclass",E_USER_WARNING); msg("No renderer '$rname' found for mode '$mode'",-1); return null; } |