mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 14:00:43 +00:00
Logging only cause of Exception in case of ExecutionException.
(no futureTask, etc. in error logs)
This commit is contained in:
@@ -248,13 +248,19 @@ public class ScriptPack extends AS3ClassTreeItem {
|
||||
}, timeout, TimeUnit.SECONDS);
|
||||
} catch (TimeoutException ex) {
|
||||
writer.continueMeasure();
|
||||
logger.log(Level.SEVERE, "Decompilation error", ex);
|
||||
logger.log(Level.SEVERE, "Decompilation timeout", ex);
|
||||
Helper.appendTimeoutCommentAs3(writer, timeout, 0);
|
||||
return;
|
||||
} catch (ExecutionException ex) {
|
||||
writer.continueMeasure();
|
||||
logger.log(Level.SEVERE, "Decompilation error", ex);
|
||||
Helper.appendErrorComment(writer, ex);
|
||||
Exception convertException = ex;
|
||||
Throwable cause = ex.getCause();
|
||||
if (ex instanceof ExecutionException && cause instanceof Exception) {
|
||||
convertException = (Exception) cause;
|
||||
}
|
||||
|
||||
logger.log(Level.SEVERE, "Decompilation error", convertException);
|
||||
Helper.appendErrorComment(writer, convertException);
|
||||
return;
|
||||
}
|
||||
writer.continueMeasure();
|
||||
|
||||
@@ -329,17 +329,18 @@ public final class MethodBody implements Cloneable {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (Exception | OutOfMemoryError | StackOverflowError ex) {
|
||||
if (ex instanceof TimeoutException) {
|
||||
logger.log(Level.SEVERE, "Decompilation timeout in: " + path, ex);
|
||||
} else {
|
||||
logger.log(Level.SEVERE, "Decompilation error in: " + path, ex);
|
||||
}
|
||||
|
||||
convertException = ex;
|
||||
Throwable cause = ex.getCause();
|
||||
if (ex instanceof ExecutionException && cause instanceof Exception) {
|
||||
convertException = (Exception) cause;
|
||||
}
|
||||
if (convertException instanceof TimeoutException) {
|
||||
logger.log(Level.SEVERE, "Decompilation timeout in: " + path, convertException);
|
||||
} else {
|
||||
logger.log(Level.SEVERE, "Decompilation error in: " + path, convertException);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user