-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use specific exceptions for AT command responses (#169)
- Loading branch information
Showing
5 changed files
with
57 additions
and
20 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
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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Additional exceptions for XBee.""" | ||
|
||
|
||
class ATCommandException(Exception): | ||
"""Base exception class for AT Command exceptions.""" | ||
|
||
|
||
class ATCommandError(ATCommandException): | ||
"""Exception for AT Command Status 1 (ERROR).""" | ||
|
||
|
||
class InvalidCommand(ATCommandException): | ||
"""Exception for AT Command Status 2 (Invalid command).""" | ||
|
||
|
||
class InvalidParameter(ATCommandException): | ||
"""Exception for AT Command Status 3 (Invalid parameter).""" | ||
|
||
|
||
class TransmissionFailure(ATCommandException): | ||
"""Exception for Remote AT Command Status 4 (Transmission failure).""" |
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