X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStatus.php;h=7a84fed1096b6c72b24553fa432a353f9a11060c;hb=ca5497c3905cf5f7a8c47b5f10a6540da090fe11;hp=7ec1b0f68c703a464e672826e9fb3932076bb726;hpb=41028cf9dedb57c29ab0705db2218d536a4ca2a2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Status.php b/includes/Status.php index 7ec1b0f68c..7a84fed109 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -31,6 +31,11 @@ * An operation which is not OK should have errors so that the user can be * informed as to what went wrong. Calling the fatal() function sets an error * message and simultaneously switches off the OK flag. + * + * The recommended pattern for Status objects is to return a Status object + * unconditionally, i.e. both on success and on failure -- so that the + * developer of the calling code is reminded that the function can fail, and + * so that a lack of error-handling will be explicit. */ class Status { var $ok = true;