Error thrown when native operation does not succeed.
| 75 | |
| 76 | |
| 77 | class KtxError(Exception): |
| 78 | """Error thrown when native operation does not succeed.""" |
| 79 | |
| 80 | invocation: str |
| 81 | """The C library function called.""" |
| 82 | |
| 83 | code: KtxErrorCode |
| 84 | """The error code returned by libktx.""" |
| 85 | |
| 86 | def __init__(self, invocation: str, code: KtxErrorCode): |
| 87 | self.invocation = invocation |
| 88 | self.code = code |
| 89 | |
| 90 | def __str__(self): |
| 91 | return str(self.invocation) + " returned with " + str(self.code) |
no outgoing calls
no test coverage detected