Task #3071
Corpus Load, remove stacktrace if broken ZIP file
Status: | New | Start date: | 05/03/2021 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | |||
Assignee: | - | % Done: | 80% |
||
Category: | Logs | Spent time: | - | ||
Target version: | TXM 0.8.2 |
Description
Currently when a .txm file is broken, typically incomplete because of an interrupted download or upload, a stacktrace not useful for the user is displayed in the console at Corpus Load (see below).
Solution¶
- Display only the following error message:
Failed to access the content of the C:\Users\$USER\Downloads\HOBBES-10-BHN-MARGIN2-2021-04-30.txm binary corpus file (error in opening zip file). The content of the file is not complete.
Current message + stacktrace¶
Fail to list files of C:\Users\$USER\Downloads\HOBBES-10-BHN-MARGIN2-2021-04-30.txm: java.util.zip.ZipException: error in opening zip file java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:225) at java.util.zip.ZipFile.<init>(ZipFile.java:155) at java.util.zip.ZipFile.<init>(ZipFile.java:169) at org.txm.utils.zip.Zip.listFiles(Zip.java:632) at org.txm.utils.zip.Zip.getRoot(Zip.java:602) at org.txm.rcp.commands.workspace.LoadBinaryCorpus.loadBinaryCorpusArchive(LoadBinaryCorpus.java:162) at org.txm.rcp.commands.workspace.LoadBinaryCorpus.execute(LoadBinaryCorpus.java:131) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92) ... at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
History
#1 Updated by Matthieu Decorde about 2 years ago
- % Done changed from 0 to 80
"Log.printStackTrace(e);" is already used
#2 Updated by Matthieu Decorde about 2 years ago
- Description updated (diff)