From a28c222e6344240da2a30834a4b9ddae88ebff17 Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Fri, 16 Nov 2018 13:20:11 +0100 Subject: [PATCH] MDL-64060 message: Use error string identifier instead full message The conversationdoesntexist string does not exists but it is better to use an error string catchable by an external client. --- message/externallib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/message/externallib.php b/message/externallib.php index cccdf07cbfb..3836ef00b7e 100644 --- a/message/externallib.php +++ b/message/externallib.php @@ -1707,7 +1707,7 @@ class core_message_external extends external_api { } 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('Conversation does not exist'); + throw new \moodle_exception('conversationdoesntexist'); } } @@ -1812,7 +1812,7 @@ class core_message_external extends external_api { } 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('Conversation does not exist'); + throw new \moodle_exception('conversationdoesntexist'); } }