mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-17 12:02:06 +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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -858,17 +858,18 @@ public abstract class Action implements GraphSourceItem {
|
||||
} 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 = cause;
|
||||
}
|
||||
if (convertException instanceof TimeoutException) {
|
||||
logger.log(Level.SEVERE, "Decompilation timeout in: " + path, convertException);
|
||||
} else {
|
||||
logger.log(Level.SEVERE, "Decompilation error in: " + path, convertException);
|
||||
}
|
||||
|
||||
}
|
||||
writer.continueMeasure();
|
||||
|
||||
@@ -1067,7 +1068,7 @@ public abstract class Action implements GraphSourceItem {
|
||||
}
|
||||
|
||||
/*ActionJump && ActionIf removed*/
|
||||
/*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) {
|
||||
/*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) {
|
||||
loopStart = ip + 1;
|
||||
isForIn = true;
|
||||
ip += 4;
|
||||
|
||||
Reference in New Issue
Block a user