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 303e190ca..692690738 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 @@ -207,7 +207,11 @@ public final class MethodBody implements Cloneable { } catch (InterruptedException ex) { throw ex; } catch (Exception | OutOfMemoryError | StackOverflowError ex) { - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error", ex); + if (ex instanceof TimeoutException) { + Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error in " + path, ex); + } else { + Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation timeout in " + path, ex); + } convertException = ex; Throwable cause = ex.getCause(); if (ex instanceof ExecutionException && cause instanceof Exception) { @@ -240,10 +244,10 @@ public final class MethodBody implements Cloneable { Graph.graphToString(convertedItems, writer, LocalData.create(constants, localRegNames, fullyQualifiedNames)); //writer.endMethod(); } else if (convertException instanceof TimeoutException) { - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error", convertException); + // exception was logged in convert method Helper.appendTimeoutComment(writer, timeout); } else { - Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error", convertException); + // exception was logged in convert method Helper.appendErrorComment(writer, convertException); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index 254bd5ac0..4c9781d0e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -163,7 +163,8 @@ public abstract class Trait implements Serializable { public void convertPackaged(Trait parent, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, NulWriter writer, List fullyQualifiedNames, boolean parallel) throws InterruptedException { Namespace ns = abc.constants.getMultiname(name_index).getNamespace(abc.constants); if ((ns.kind == Namespace.KIND_PACKAGE) || (ns.kind == Namespace.KIND_PACKAGE_INTERNAL)) { - convert(parent, path, abc, isStatic, exportMode, scriptIndex, classIndex, writer, fullyQualifiedNames, parallel); + String nsname = ns.getName(abc.constants, false); + convert(parent, path + nsname, abc, isStatic, exportMode, scriptIndex, classIndex, writer, fullyQualifiedNames, parallel); } } 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 cc3ebf96a..470ab6d27 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 @@ -719,7 +719,11 @@ public abstract class Action implements GraphSourceItem { } catch (InterruptedException ex) { throw ex; } catch (Exception | OutOfMemoryError | StackOverflowError ex) { - logger.log(Level.SEVERE, "Decompilation error in: " + path, ex); + if (ex instanceof TimeoutException) { + logger.log(Level.SEVERE, "Decompilation error in: " + path, ex); + } else { + logger.log(Level.SEVERE, "Decompilation timeout in: " + path, ex); + } convertException = ex; Throwable cause = ex.getCause(); if (ex instanceof ExecutionException && cause instanceof Exception) { @@ -734,10 +738,8 @@ public abstract class Action implements GraphSourceItem { if (convertException == null) { Graph.graphToString(tree, writer, new LocalData()); } else if (convertException instanceof TimeoutException) { - logger.log(Level.SEVERE, "Decompilation error in: " + path, convertException); Helper.appendTimeoutComment(writer, timeout); } else { - logger.log(Level.SEVERE, "Decompilation error in: " + path, convertException); Helper.appendErrorComment(writer, convertException); } if (asm != null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java index d45f6535e..340cf7bf8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java @@ -857,7 +857,7 @@ public class Helper { writer.appendNoHilight(" * ").appendNoHilight(decompilationErrorAdd).newLine(); } writer.appendNoHilight(" * ").appendNoHilight(AppResources.translate("decompilationError.errorType")). - appendNoHilight(": " + ex.getClass().getSimpleName()).newLine(); + appendNoHilight(": " + ex.getClass().getSimpleName() + " (" + ex.getMessage() + ")").newLine(); writer.appendNoHilight(" */").newLine(); writer.appendNoHilight("throw new flash.errors.IllegalOperationError(\""). appendNoHilight(AppResources.translate("decompilationError.error.description")). diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java index 5ec4d9002..f5cbe1bf2 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java @@ -76,7 +76,7 @@ public abstract class MainFrameMenu { swf.binaryData.setModified(true); saved = true; } catch (IOException ex) { - Logger.getLogger(MainFrameClassicMenu.class.getName()).log(Level.SEVERE, "Cannot save SWF", ex); + Logger.getLogger(MainFrameMenu.class.getName()).log(Level.SEVERE, "Cannot save SWF", ex); } } else if (swf.getFile() == null) { saved = saveAs(swf, SaveFileMode.SAVEAS); @@ -85,7 +85,7 @@ public abstract class MainFrameMenu { Main.saveFile(swf, swf.getFile()); saved = true; } catch (IOException ex) { - Logger.getLogger(MainFrameClassicMenu.class.getName()).log(Level.SEVERE, null, ex); + Logger.getLogger(MainFrameMenu.class.getName()).log(Level.SEVERE, null, ex); View.showMessageDialog(null, translate("error.file.save"), translate("error"), JOptionPane.ERROR_MESSAGE); } } diff --git a/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java b/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java index d1c391050..22a745043 100644 --- a/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java +++ b/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java @@ -178,7 +178,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe File rf = new File(replacementsFile); if (rf.exists()) { if (!rf.delete()) { - Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE, "Cannot delete replacements file"); + Logger.getLogger(ProxyFrame.class.getName()).log(Level.SEVERE, "Cannot delete replacements file"); } } } else { @@ -188,7 +188,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe pw.println(r.targetFile); } } catch (IOException ex) { - Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE, "Exception during saving replacements", ex); + Logger.getLogger(ProxyFrame.class.getName()).log(Level.SEVERE, "Exception during saving replacements", ex); } } } diff --git a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java index c94ee717e..dfcf9c88c 100644 --- a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeContextMenu.java @@ -351,7 +351,7 @@ public class TagTreeContextMenu extends JPopupMenu implements ActionListener { swf.updateCharacters(); mainPanel.refreshTree(); } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | SecurityException | IllegalArgumentException | InvocationTargetException ex) { - Logger.getLogger(TagTree.class.getName()).log(Level.SEVERE, null, ex); + Logger.getLogger(TagTreeContextMenu.class.getName()).log(Level.SEVERE, null, ex); } } });