Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Errors handling in web services: Difference between revisions

From MoodleDocs
No edit summary
(Blanked the page)
 
Line 1: Line 1:
Jerome Mouneyrac - 08/05/2012


About the exception format (https://docs.moodle.org/dev/Errors_handling_in_web_services#How_to_handle_exception_on_the_client_side):
* the difference between message/debuginfo is that message can be considered as a code error (e.g. "A search criteria is wrong"). Debuginfo contains the detailled reason why it failed (e.g. "You are not allowed to search on the theme field").
* sometimes exceptions are thrown at lower level and they are already translated.
* we can not change much of the existing thrown web service exception without potentially breaking existing clients. However we can make the next functions consistent :)
Lightwork's proposal for warning structure can be found there: https://github.com/Lightwork-Marking/moodle/blob/b9e23bbbbd2dbf0066ccf3f28d22721b3d76a3d3/user/externallib.php#L162-176

Latest revision as of 10:37, 10 May 2012