Esempio n. 1
0
 def from_bytes(b):
     ray_exception = RayException()
     ray_exception.ParseFromString(b)
     if ray_exception.language == PYTHON:
         return pickle.loads(ray_exception.serialized_exception)
     else:
         return CrossLanguageError(ray_exception)
Esempio n. 2
0
 def from_bytes(b):
     ray_exception = RayException()
     ray_exception.ParseFromString(b)
     if ray_exception.language == PYTHON:
         try:
             return pickle.loads(ray_exception.serialized_exception)
         except Exception as e:
             msg = "Failed to unpickle serialized exception"
             raise RuntimeError(msg) from e
     else:
         return CrossLanguageError(ray_exception)
Esempio n. 3
0
 def from_bytes(b):
     ray_exception = RayException()
     ray_exception.ParseFromString(b)
     return RayError.from_ray_exception(ray_exception)