(self)
| 28 | """Super class of all ray exception types.""" |
| 29 | |
| 30 | def to_bytes(self): |
| 31 | # Extract exc_info from exception object. |
| 32 | exc_info = (type(self), self, self.__traceback__) |
| 33 | formatted_exception_string = "\n".join(format_exception(*exc_info)) |
| 34 | return RayException( |
| 35 | language=PYTHON, |
| 36 | serialized_exception=pickle.dumps(self), |
| 37 | formatted_exception_string=formatted_exception_string, |
| 38 | ).SerializeToString() |
| 39 | |
| 40 | @staticmethod |
| 41 | def from_bytes(b): |