diff --git a/lib/simpletestlib.php b/lib/simpletestlib.php index 47956b50fab..feb674cfef4 100644 --- a/lib/simpletestlib.php +++ b/lib/simpletestlib.php @@ -594,7 +594,6 @@ class FakeDBUnitTestCase extends UnitTestCase { } else { $a = new stdClass(); $a->filename = $this->pkfile; - debug_print_backtrace(); throw new moodle_exception('testtablescsvfilemissing', 'simpletest', '', $a); return false; } @@ -805,7 +804,6 @@ class UnitTestDB { $a = new stdClass(); $a->id = $dataobject->id; $a->table = $table; - debug_print_backtrace(); throw new moodle_exception('updatingnoninsertedrecord', 'simpletest', '', $a); } else { return UnitTestDB::$DB->update_record($table, $dataobject, $bulk); @@ -847,7 +845,6 @@ class UnitTestDB { if ($proceed_with_delete) { return UnitTestDB::$DB->delete_records($table, $conditions); } else { - debug_print_backtrace(); throw new moodle_exception('deletingnoninsertedrecord', 'simpletest', '', $a); } } @@ -881,7 +878,6 @@ class UnitTestDB { if ($proceed_with_delete) { return UnitTestDB::$DB->delete_records_select($table, $select, $params); } else { - debug_print_backtrace(); throw new moodle_exception('deletingnoninsertedrecord', 'simpletest', '', $a); } } @@ -908,7 +904,7 @@ class UnitTestDB { public function get_field($table, $return, array $conditions) { if (!is_array($conditions)) { - debug_print_backtrace(); + throw new coding_exception('$conditions is not an array.'); } return UnitTestDB::$DB->get_field($table, $return, $conditions); } diff --git a/mod/resource/lib.php b/mod/resource/lib.php index 6bfc27b6f7d..40cfb7e6adb 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -858,7 +858,6 @@ class resource_portfolio_caller extends portfolio_module_caller_base { require_once($this->resourcefile); $this->resource= new $resourceclass($this->cm->id); if (!is_callable(array($this->resource, 'portfolio_prepare_package')) || !is_callable(array($this->resource, 'portfolio_get_sha1'))) { - debug_print_backtrace(); throw new portfolio_exception('portfolionotimplemented', 'resource', null, $this->cm->type); } $this->supportedformats = array(self::type_to_format($this->cm->type));