Open main menu

Changes

Relax source design

20 bytes added, 07:48, 26 September 2014
→‎Implementation: Changed the code example for the check_*() functions.
# Init.
flag check_ok = True
msg = ''
# Check that...
if not something():
flag check_ok = False
msg = "Something is missing."
# Warnings and errors.
if not flag check_ok and escalate == 1:
warn(RelaxWarning(msg))
elif not flag check_ok and escalate == 2:
raise RelaxError(msg)
# Return the answerstatus. return flagcheck_ok
</source>
Trusted, Bureaucrats
4,228

edits