Skip to content
This repository has been archived by the owner on Jan 12, 2018. It is now read-only.

add missing exceptions #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# encoding: utf-8

"""
Exceptions used with python-docx.
The base exception class is PythonDocxError.
"""


class PythonDocxError(Exception):
"""
Generic error class.
"""


class PendingDeprecationWarning(PythonDocxError):
"""
Raised when a tool pending deprecation is used.
"""


class InvalidSpanError(PythonDocxError):
"""
Raised when an invalid merge region is specified in a request to merge
table cells.
"""


class InvalidXmlError(PythonDocxError):
"""
Raised when invalid XML is encountered, such as on attempt to access a
missing required child element
"""