Task #3071

Corpus Load, remove stacktrace if broken ZIP file

Ajouté par Serge Heiden il y a plus de 4 ans. Mis à jour il y a plus d'un an.

Statut:Closed Début:03/05/2021
Priorité:Normal Echéance:
Assigné à:- % réalisé:

100%

Catégorie:Logs Temps passé: -
Version cible: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)

Historique

#1 Mis à jour par Matthieu Decorde il y a plus de 4 ans

  • % réalisé changé de 0 à 80

"Log.printStackTrace(e);" is already used

#2 Mis à jour par Matthieu Decorde il y a plus de 4 ans

  • Description mis à jour (diff)

#3 Mis à jour par Sebastien Jacquot il y a plus d'un an

  • % réalisé changé de 80 à 100

#4 Mis à jour par Sebastien Jacquot il y a plus d'un an

  • Statut changé de New à Closed

Formats disponibles : Atom PDF