-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exception when grabbing fails (#46)
* adding exception when grabbing fails * Automatically reformatting code with black and isort * updating __init__.py * Automatically reformatting code with black and isort --------- Co-authored-by: Auto-format Bot <[email protected]>
- Loading branch information
1 parent
7b8c0b7
commit 892af4a
Showing
3 changed files
with
14 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class GrabError(Exception): | ||
"""Exception raised for errors in the frame grabbing process.""" | ||
|
||
def __init__(self, message="Failed to grab frame from camera."): | ||
self.message = message | ||
super().__init__(self.message) |
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