summaryrefslogtreecommitdiff
path: root/cxmanage_api/cx_exceptions.py
diff options
context:
space:
mode:
authorGeorge Kraft <george.kraft@calxeda.com>2013-10-01 15:52:31 -0500
committerGeorge Kraft <george.kraft@calxeda.com>2013-10-01 15:52:31 -0500
commitd4bddc138d5887119a7844463cb8300cede1504d (patch)
treec305b767fd0b6aefb6036856a97351fd4408ccaa /cxmanage_api/cx_exceptions.py
parent133751e03e045d27b54530a0118e40ea1e1362be (diff)
parent52057843f2b4002095422069ae0abbfa360de9ed (diff)
downloadcxmanage-d4bddc138d5887119a7844463cb8300cede1504d.tar.gz
Merge branch 'master' into win32_supportwin32_support
Diffstat (limited to 'cxmanage_api/cx_exceptions.py')
-rw-r--r--cxmanage_api/cx_exceptions.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/cxmanage_api/cx_exceptions.py b/cxmanage_api/cx_exceptions.py
index df2dcc7..5f60df7 100644
--- a/cxmanage_api/cx_exceptions.py
+++ b/cxmanage_api/cx_exceptions.py
@@ -46,6 +46,30 @@ from tftpy.TftpShared import TftpException
# Defines the custom exceptions used by the cxmanage_api project.
#
+class EEPROMUpdateError(Exception):
+ """Raised when an error is encountered while updating the EEPROM
+
+ >>> from cxmanage_api.cx_exceptions import TimeoutError
+ >>> raise TimeoutError('My custom exception text!')
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ cxmanage_api.cx_exceptions.TimeoutError: My custom exception text!
+
+ :param msg: Exceptions message and details to return to the user.
+ :type msg: string
+ :raised: When an error is encountered while updating the EEPROM
+
+ """
+
+ def __init__(self, msg):
+ """Default constructor for the EEPROMUpdateError class."""
+ super(EEPROMUpdateError, self).__init__()
+ self.msg = msg
+
+ def __str__(self):
+ """String representation of this Exception class."""
+ return self.msg
+
class TimeoutError(Exception):
"""Raised when a timeout has been reached.