-
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 Python binding for Ipl3ChecksumError
- Loading branch information
1 parent
f423708
commit e879377
Showing
6 changed files
with
174 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# SPDX-FileCopyrightText: © 2024 Decompollaborate | ||
# SPDX-License-Identifier: MIT | ||
|
||
from __future__ import annotations | ||
|
||
|
||
class Ipl3ChecksumError(RuntimeError): | ||
""" | ||
Base exception for all the exceptions raised by this library. | ||
""" | ||
|
||
|
||
class UnalignedRead(Ipl3ChecksumError): | ||
""" | ||
An unaligned read happened. | ||
(This is probably a library bug, please report me). | ||
""" | ||
|
||
class ByteConversion(Ipl3ChecksumError): | ||
""" | ||
Failed to convert bytes to words. | ||
(This is probably a library bug, please report me). | ||
""" | ||
|
||
class OutOfBounds(Ipl3ChecksumError): | ||
""" | ||
Tried to access data out of bounds. | ||
(This is probably a library bug, please report me). | ||
""" | ||
|
||
class BufferNotBigEnough(Ipl3ChecksumError): | ||
""" | ||
The input byte buffer is not big enough. | ||
The buffer can be larger than the expected size. | ||
The error runtime string specifies how big the buffer was expected to be. | ||
""" | ||
|
||
class BufferSizeIsWrong(Ipl3ChecksumError): | ||
""" | ||
The input byte buffer didn't have the exact expected size. | ||
The error runtime string specifies the expected size. | ||
""" | ||
|
||
class UnableToDetectCIC(Ipl3ChecksumError): | ||
""" | ||
Unable to detect CIC variant | ||
""" |
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