From 49459eb03ac460efac8b4e12f856dda92d58900b Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 24 Oct 2008 17:56:35 +0000 Subject: [PATCH] MDL-16930 dml - towards exceptions --- lib/dmllib.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/dmllib.php b/lib/dmllib.php index 64a39ae80e..cf876d88ca 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -37,6 +37,15 @@ require_once($CFG->libdir.'/dml/moodle_database.php'); +/** + * DML exception class, use instead of error() in dml code. + */ +class dml_exception extends moodle_exception { + function __construct($errorcode, $a=NULL, $debuginfo=null) { + parent::__construct($errorcode, '', '', $a, $debuginfo); + } +} + /** * Sets up global $DB moodle_database instance * @return void -- 2.39.5