mirror of
https://github.com/wassname/ray.git
synced 2026-07-02 11:20:09 +08:00
[Java] Remove singleton exceptions (#6765)
This commit is contained in:
@@ -8,9 +8,8 @@ package org.ray.api.exception;
|
||||
*/
|
||||
public class RayActorException extends RayException {
|
||||
|
||||
public static final RayActorException INSTANCE = new RayActorException();
|
||||
|
||||
private RayActorException() {
|
||||
public RayActorException() {
|
||||
super("The actor died unexpectedly before finishing this task.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@ package org.ray.api.exception;
|
||||
*/
|
||||
public class RayWorkerException extends RayException {
|
||||
|
||||
public static final RayWorkerException INSTANCE = new RayWorkerException();
|
||||
|
||||
private RayWorkerException() {
|
||||
public RayWorkerException() {
|
||||
super("The worker died unexpectedly while executing this task.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ public class ObjectSerializer {
|
||||
if (Arrays.equals(meta, RAW_TYPE_META)) {
|
||||
return data;
|
||||
} else if (Arrays.equals(meta, WORKER_EXCEPTION_META)) {
|
||||
return RayWorkerException.INSTANCE;
|
||||
return new RayWorkerException();
|
||||
} else if (Arrays.equals(meta, ACTOR_EXCEPTION_META)) {
|
||||
return RayActorException.INSTANCE;
|
||||
return new RayActorException();
|
||||
} else if (Arrays.equals(meta, UNRECONSTRUCTABLE_EXCEPTION_META)) {
|
||||
return new UnreconstructableException(objectId);
|
||||
} else if (Arrays.equals(meta, TASK_EXECUTION_EXCEPTION_META)) {
|
||||
|
||||
Reference in New Issue
Block a user