]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16930 dml - towards exceptions
authorskodak <skodak>
Fri, 24 Oct 2008 17:56:35 +0000 (17:56 +0000)
committerskodak <skodak>
Fri, 24 Oct 2008 17:56:35 +0000 (17:56 +0000)
lib/dmllib.php

index 64a39ae80ec2ce0b1f44554a86f254da0fd397d2..cf876d88ca990dac294d842fc75b1a9d5109ed2b 100644 (file)
 
 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