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.
This commit is contained in:
Juan Leyva
2018-11-16 13:20:11 +01:00
parent 8907290a46
commit a28c222e63
+2 -2
View File
@@ -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');
}
}