Feature #2948

Update, remove stacktrace if no updates available

Added by Serge Heiden 5 months ago. Updated 5 months ago.

Status:New Start date:11/17/2020
Priority:Normal Due date:
Assignee:- % Done:

30%

Category:Update Spent time: -
Target version:TXM 0.8.2

Description

In TXM 0.8.1, when no update repository is available for an update level the whole stacktraces below are displayed in the console.

This doesn't help but confuses the user.

Solution

  • remove the stacktraces from the console, or move some of them in a more detailed log level (MD, the stacktrace is shown only if the technical log preference is checked)
  • catch the exception and just display in the console the message : ("EN:No {0} level update available. / FR: Aucune mise à jour de niveau {0} disponible.", <update level>)

Stacktraces

Looking for TXM updates...
Done.
No repo - create a new artifact repo
Stacktrace:
[1]  org.txm.rcp.p2.plugins.TXMUpdateHandler.               addURL  TXMUpdateHandler.java, 457
[2]  org.txm.rcp.p2.plugins.TXMUpdateHandler.addDefaultUpdateSites  TXMUpdateHandler.java, 311
[3]  org.txm.rcp.p2.plugins.TXMUpdateHandler.              execute  TXMUpdateHandler.java, 152
[4]                  org.txm.rcp.Application.                start  Application.java, 260
Error while adding artifact repo: https://gitlab.huma-num.fr/txm/txm-software/-/raw/master/dist//0.8.1/main/dev
Stacktrace:
[1]  org.txm.rcp.p2.plugins.TXMUpdateHandler.               addURL  TXMUpdateHandler.java, 462
[2]  org.txm.rcp.p2.plugins.TXMUpdateHandler.addDefaultUpdateSites  TXMUpdateHandler.java, 311
[3]  org.txm.rcp.p2.plugins.TXMUpdateHandler.              execute  TXMUpdateHandler.java, 152
[4]                  org.txm.rcp.Application.                start  Application.java, 260
org.eclipse.equinox.p2.core.ProvisionException: Aucun dépôt trouvé à https://gitlab.huma-num.fr/txm/txm-software/-/raw/master/dist//0.8.1/main/dev.
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:395)
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:653)
    at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:104)
    at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:100)
    at org.txm.rcp.p2.plugins.TXMUpdateHandler.addURL(TXMUpdateHandler.java:451)
    at org.txm.rcp.p2.plugins.TXMUpdateHandler.addDefaultUpdateSites(TXMUpdateHandler.java:311)
    at org.txm.rcp.p2.plugins.TXMUpdateHandler.execute(TXMUpdateHandler.java:152)
    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.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.txm.rcp.Application.start(Application.java:260)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
No repo - create a new artifact repo
Stacktrace:
[1]  org.txm.rcp.p2.plugins.TXMUpdateHandler.               addURL  TXMUpdateHandler.java, 457
[2]  org.txm.rcp.p2.plugins.TXMUpdateHandler.addDefaultPluginSites  TXMUpdateHandler.java, 379
[3]  org.txm.rcp.p2.plugins.TXMUpdateHandler.              execute  TXMUpdateHandler.java, 153
[4]                  org.txm.rcp.Application.                start  Application.java, 260
Error while adding artifact repo: https://gitlab.huma-num.fr/txm/txm-software/-/raw/master/dist//0.8.1/ext/dev
Stacktrace:
[1]  org.txm.rcp.p2.plugins.TXMUpdateHandler.               addURL  TXMUpdateHandler.java, 462
[2]  org.txm.rcp.p2.plugins.TXMUpdateHandler.addDefaultPluginSites  TXMUpdateHandler.java, 379
[3]  org.txm.rcp.p2.plugins.TXMUpdateHandler.              execute  TXMUpdateHandler.java, 153
[4]                  org.txm.rcp.Application.                start  Application.java, 260
org.eclipse.equinox.p2.core.ProvisionException: Aucun dépôt trouvé à https://gitlab.huma-num.fr/txm/txm-software/-/raw/master/dist//0.8.1/ext/dev.
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:395)
    at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:653)
    at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:104)
    at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:100)
    at org.txm.rcp.p2.plugins.TXMUpdateHandler.addURL(TXMUpdateHandler.java:451)
    at org.txm.rcp.p2.plugins.TXMUpdateHandler.addDefaultPluginSites(TXMUpdateHandler.java:379)
    at org.txm.rcp.p2.plugins.TXMUpdateHandler.execute(TXMUpdateHandler.java:153)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
...
    at org.txm.rcp.Application.start(Application.java:260)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

Associated revisions

Revision 2970
Added by Matthieu Decorde 5 months ago

fix en message refs #2948

History

#1 Updated by Matthieu Decorde 5 months ago

  • Subject changed from remove stacktrace if no updates available to Update, remove stacktrace if no updates available
  • Description updated (diff)

#2 Updated by Matthieu Decorde 5 months ago

  • % Done changed from 0 to 30

EN message fixed (need to externalize and translate the message)

Also available in: Atom PDF