chaokunyang commented on code in PR #2284:
URL: https://github.com/apache/fury/pull/2284#discussion_r2122964933
##########
java/fury-core/src/main/java/org/apache/fury/util/ExceptionUtils.java:
##########
@@ -57,15 +59,35 @@ public static StackOverflowError
trySetStackOverflowErrorMessage(
public static RuntimeException handleReadFailed(Fury fury, Throwable t) {
if (fury.getRefResolver() instanceof MapRefResolver) {
- ObjectArray readObjects = ((MapRefResolver)
fury.getRefResolver()).getReadObjects();
- // carry with read objects for better trouble shooting.
- List<Object> objects = Arrays.asList(readObjects.objects).subList(0,
readObjects.size);
- throw new DeserializationException(objects, t);
+ List<Object> exceptionObjects = getExceptionObjects(fury);
+ throw new DeserializationException(exceptionObjects, t);
} else {
Platform.throwException(t);
throw new IllegalStateException("unreachable");
}
}
+ public static List<Object> getExceptionObjects(Fury fury) {
+ ObjectArray readObjects = ((MapRefResolver)
fury.getRefResolver()).getReadObjects();
+ // carry with read objects for better trouble shooting.
+ List<Object> objects = Arrays.asList(readObjects.objects).subList(0,
readObjects.size);
+ switch (fury.getExceptionLogMode()) {
Review Comment:
```suggestion
switch (fury.getConfig().getExceptionLogMode()) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]