Refactored
This commit is contained in:
26
wo/core/exc.py
Normal file
26
wo/core/exc.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""WordOps exception classes."""
|
||||
|
||||
|
||||
class WOError(Exception):
|
||||
"""Generic errors."""
|
||||
def __init__(self, msg):
|
||||
Exception.__init__(self)
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
return self.msg
|
||||
|
||||
|
||||
class WOConfigError(WOError):
|
||||
"""Config related errors."""
|
||||
pass
|
||||
|
||||
|
||||
class WORuntimeError(WOError):
|
||||
"""Generic runtime errors."""
|
||||
pass
|
||||
|
||||
|
||||
class WOArgumentError(WOError):
|
||||
"""Argument related errors."""
|
||||
pass
|
||||
Reference in New Issue
Block a user