-
Notifications
You must be signed in to change notification settings - Fork 10
/
seash_exceptions.py
41 lines (31 loc) · 1.03 KB
/
seash_exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Author: Alan Loh
Module: A library to hold the definitions of common
seash exceptions and errors.
To avoid declaring or inheriting the same exception
definitions from other files, declare all new exceptions
and errors here for easier accessibility by other files.
"""
# Base class for module-related errors/exceptions.
class ModuleError(Exception):
pass
# There is a conflict between two modules.
# The string passed in should be the conflicting command.
class ModuleConflictError(ModuleError):
pass
# Used by module system for errors in importing modules
class ModuleImportError(ModuleError):
pass
# Used by command parser for errors in reading commands
class DispatchError(Exception):
pass
# Used by the command parser for invalid command inputs
class ParseError(Exception):
pass
# Use this to signal an error we want to print...
class UserError(Exception):
"""This indicates the user typed an incorrect command"""
pass
# Use this to signal an error during initializing module.
class InitializeError(Exception):
pass