-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added exception catching and manual error printing for the command li…
…ne usage
- Loading branch information
1 parent
01aef2e
commit d0977ef
Showing
2 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
class InvalidParameter(Exception): | ||
|
||
# Base exception class for the project to make all exceptions easy to catch selectively | ||
class CCInputException(Exception): | ||
pass | ||
|
||
class InvalidParameter(CCInputException): | ||
pass | ||
|
||
class InvalidXYZ(InvalidParameter): | ||
pass | ||
|
||
class ImpossibleCalculation(Exception): | ||
class ImpossibleCalculation(CCInputException): | ||
pass | ||
|
||
class MissingParameter(Exception): | ||
class MissingParameter(CCInputException): | ||
pass | ||
|
||
class InternalError(Exception): | ||
class InternalError(CCInputException): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters