Convert a string to GraphLiteCoreError.
(message: Union[str, bytes])
| 81 | # ============================================================================ |
| 82 | |
| 83 | def from_string(message: Union[str, bytes]) -> GraphLiteCoreError: |
| 84 | """ |
| 85 | Convert a string to GraphLiteCoreError. |
| 86 | """ |
| 87 | if isinstance(message, bytes): |
| 88 | message = message.decode('utf-8', errors='replace') |
| 89 | return GraphLiteCoreError(message) |
| 90 | |
| 91 | |
| 92 | def from_json_error(error: json.JSONDecodeError) -> SerializationError: |
nothing calls this directly
no test coverage detected