Created
March 31, 2016 16:01
-
-
Save ViktorStiskala/bbb12255d8b7298d0273f2367cd99964 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def note_error(self, *msg): | |
if self.strict: | |
raise PermError(*msg) | |
# if lax mode, note error and continue | |
if not self.perm_error: | |
try: | |
raise PermError(*msg) | |
except PermError as x: | |
# FIXME: keep a list of errors for even friendlier diagnostics. | |
self.perm_error = x | |
return self.perm_error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment