Returns the corresponding name of the given error code or a string containing its numeric value.
(error_code: int)
| 594 | |
| 595 | |
| 596 | def error_code_to_str(error_code: int) -> str: |
| 597 | """Returns the corresponding name of the given error code or a string containing its numeric value.""" |
| 598 | |
| 599 | try: |
| 600 | return H3ErrorCode(error_code).name |
| 601 | except ValueError: |
| 602 | try: |
| 603 | return QuicErrorCode(error_code).name |
| 604 | except ValueError: |
| 605 | return f"unknown error (0x{error_code:x})" |
| 606 | |
| 607 | |
| 608 | def is_success_error_code(error_code: int) -> bool: |
no outgoing calls
searching dependent graphs…