diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-08-31 09:45:12 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-08-31 09:45:12 -0500 |
commit | 1ce2bccd3747f5c311f40389fa3895e29dfae21b (patch) | |
tree | bfcabf78ebb9557d24c63981b52e691b4399f28c | |
parent | a6237d68257dd3bb963850c205d0ca4a1c46f88a (diff) |
generic preprocessor-specific exception classes
These are basic python Exception subclasses that can be used to throw
more specific errors and exceptions from within the preprocessor.
AssertionError is not a good idea.
-rw-r--r-- | preprocessor.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/preprocessor.py b/preprocessor.py index b6bdfbe7d..69121747d 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -302,6 +302,16 @@ chars = { "9": 0xFF } +class PreprocessorException(Exception): + """ + There was a problem in the preprocessor. + """ + +class MacroException(PreprocessorException): + """ + There was a problem with a macro. + """ + def separate_comment(l): """ Separates asm and comments on a single line. |