Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MDL-64060 message: Replace error code by language str
  • Loading branch information
David Monllao committed Nov 19, 2018
1 parent a6c4e6f commit 892356a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lang/en/message.php
Expand Up @@ -61,6 +61,7 @@
$string['emailtagline'] = 'This is a copy of a message sent to you at "{$a->sitename}". Go to {$a->url} to reply.';
$string['enabled'] = 'Enabled';
$string['errorcallingprocessor'] = 'Error calling defined output';
$string['errorconversationdoesnotexist'] = 'Conversation does not exist';
$string['errortranslatingdefault'] = 'Error translating default setting provided by plugin, using system defaults instead.';
$string['eventgroupmessagesent'] = 'Group message sent';
$string['eventnotificationviewed'] = 'Notification viewed';
Expand Down
4 changes: 2 additions & 2 deletions message/externallib.php
Expand Up @@ -1708,7 +1708,7 @@ public static function get_conversation(
} else {
// We have to throw an exception here because the external functions annoyingly
// don't accept null to be returned for a single structure.
throw new \moodle_exception('conversationdoesntexist');
throw new \moodle_exception('errorconversationdoesnotexist', 'message');
}
}

Expand Down Expand Up @@ -1813,7 +1813,7 @@ public static function get_conversation_between_users(
} else {
// We have to throw an exception here because the external functions annoyingly
// don't accept null to be returned for a single structure.
throw new \moodle_exception('conversationdoesntexist');
throw new \moodle_exception('errorconversationdoesnotexist', 'message');
}
}

Expand Down

0 comments on commit 892356a

Please sign in to comment.