Commit 529e52fa authored by Penny Leach's avatar Penny Leach
Browse files

made artefact not found exception string i18nised and nicer

parent 2c948d86
......@@ -108,7 +108,7 @@ abstract class ArtefactType {
if (!empty($id)) {
if (empty($data)) {
if (!$data = get_record('artefact','id',$id)) {
throw new ArtefactNotFoundException("Artefact with id $id not found");
throw new ArtefactNotFoundException(get_string('artefactnotfound', 'error', $id));
}
}
$this->id = $id;
......
......@@ -58,4 +58,6 @@ $string['accessdeniedexception'] = 'You do not have access to view this page';
$string['viewnotfoundexceptiontitle'] = 'View not found';
$string['viewnotfoundexceptionmessage'] = 'You tried to access a view that didn\'t exist!';
$string['artefactnotfound'] = "Artefact with id %s not found (maybe it has been deleted already?)";
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment