} else {
$a = new stdClass();
$a->filename = $this->pkfile;
- debug_print_backtrace();
throw new moodle_exception('testtablescsvfilemissing', 'simpletest', '', $a);
return false;
}
$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);
if ($proceed_with_delete) {
return UnitTestDB::$DB->delete_records($table, $conditions);
} else {
- debug_print_backtrace();
throw new moodle_exception('deletingnoninsertedrecord', 'simpletest', '', $a);
}
}
if ($proceed_with_delete) {
return UnitTestDB::$DB->delete_records_select($table, $select, $params);
} else {
- debug_print_backtrace();
throw new moodle_exception('deletingnoninsertedrecord', 'simpletest', '', $a);
}
}
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);
}
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));