diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index c1b855b35..ded918e42 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -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(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java index 7c28f17ca..0164dafa8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -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); + } + } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java index 58e21b37d..df08e724c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java @@ -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;