MDL-71062 core: Step 1 deprecation of print_error function

This commit is contained in:
Sujith Haridasan
2022-07-13 08:20:54 +05:30
parent a23f0bff3e
commit 73d604369d
506 changed files with 1511 additions and 1488 deletions
+2 -2
View File
@@ -104,7 +104,7 @@ if (!empty($edit) || !empty($new)) {
core_plugin_manager::reset_caches();
redirect($parenturl);
} else {
print_error('instancenotsaved', 'repository', $parenturl);
throw new \moodle_exception('instancenotsaved', 'repository', $parenturl);
}
exit;
} else {
@@ -134,7 +134,7 @@ if (!empty($edit) || !empty($new)) {
core_plugin_manager::reset_caches();
redirect($parenturl, $deletedstr, 3);
} else {
print_error('instancenotdeleted', 'repository', $parenturl);
throw new \moodle_exception('instancenotdeleted', 'repository', $parenturl);
}
exit;
}