diff options
author | Matthew Peveler <matt.peveler@gmail.com> | 2021-09-18 21:16:44 -1000 |
---|---|---|
committer | Matthew Peveler <matt.peveler@gmail.com> | 2021-09-18 22:41:10 -1000 |
commit | 045b3f6c422cddb2f8bf81039e9c7ffc47d27ee0 (patch) | |
tree | 82847801e95e3787b571fa62adcc0f21eee92869 | |
parent | 77708850d863de63df318f96b89404de6fe1f84a (diff) | |
download | asciidoc-py3-045b3f6c422cddb2f8bf81039e9c7ffc47d27ee0.tar.gz |
Create exceptions module to contain exception classes
-rw-r--r-- | asciidoc/api.py | 5 | ||||
-rw-r--r-- | asciidoc/asciidoc.py | 6 | ||||
-rw-r--r-- | asciidoc/exceptions.py | 8 |
3 files changed, 10 insertions, 9 deletions
diff --git a/asciidoc/api.py b/asciidoc/api.py index 1e3d215..8b8a1a0 100644 --- a/asciidoc/api.py +++ b/asciidoc/api.py @@ -1,8 +1,5 @@ from . import asciidoc - - -class AsciiDocError(Exception): - pass +from .exceptions import AsciiDocError class Options(object): diff --git a/asciidoc/asciidoc.py b/asciidoc/asciidoc.py index 07b23f7..9ab1dd2 100644 --- a/asciidoc/asciidoc.py +++ b/asciidoc/asciidoc.py @@ -38,6 +38,7 @@ from ast import literal_eval from collections import OrderedDict from .collections import AttrDict, InsensitiveDict +from .exceptions import EAsciiDoc CONF_DIR = os.path.join(os.path.dirname(__file__), 'resources') METADATA = {} @@ -71,11 +72,6 @@ DEFAULT_NEWLINE = '\r\n' # Utility functions and classes. # --------------------------------------------------------------------------- - -class EAsciiDoc(Exception): - pass - - class Trace(object): """ Used in conjunction with the 'trace' attribute to generate diagnostic diff --git a/asciidoc/exceptions.py b/asciidoc/exceptions.py new file mode 100644 index 0000000..8f32a4a --- /dev/null +++ b/asciidoc/exceptions.py @@ -0,0 +1,8 @@ +class EAsciiDoc(Exception): + """Exceptions raised by the main asciidoc process""" + pass + + +class AsciiDocError(Exception): + """Exceptions raised by the asciidoc API""" + pass |