Bug #3018

CQP, restore CQL error messages

Added by Matthieu Decorde 2 months ago. Updated 2 months ago.

Status:New Start date:02/09/2021
Priority:Urgent Due date:
Assignee:- % Done:

0%

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

Description

fr - slh 09/02/2021

Depuis TXM 0.8.1, on a perdu en finesse de messages de diagnostic des problèmes courants en CQL.
En cas de problème, les messages d'erreurs dans la console incluent une stacktrace brute et une stacktrace synthètique, comme ci-dessous (cas A et cas B, je n'ai pas analysé tous les cas).

En fait, les stacktraces ne sont pas utiles à l'utilisateur et je me demande si elles sont utiles aux développeurs dans la mesure où il s'agit d'erreurs de syntaxe (pas du logiciel).

Voici ce qu'il faut a minima afficher pour chacun de ces cas :

- cas A :
Concordance de <#[^0-9]#> dans le corpus CORPUSDEDEVELOPPEMENTTXT...
  • Erreur interne liée à la requête CQL, abandon de la commande.
- cas B :
Concordance de <[^0-9> dans le corpus CORPUSDEDEVELOPPEMENTTXT...
  • Erreur de syntaxe d'expression régulière, abandon de la commande.

Si on pouvait faire plus précis et exhaustif, ce serait mieux. Il faut généraliser à tous les cas d'erreur retournés par CQP/CQi.

Cas A

Concordance de <#[^0-9]#> dans le corpus CORPUSDEDEVELOPPEMENTTXT...
org.txm.searchengine.cqp.serverException.CqiClErrorInternal:
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:165)
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:67)
    at org.txm.searchengine.cqp.MemCqiClient.cqpQuery(MemCqiClient.java:409)
    at org.txm.searchengine.cqp.corpus.CQPCorpus.query(CQPCorpus.java:1360)
    at org.txm.searchengine.cqp.CQPSearchEngine.query(CQPSearchEngine.java:415)
    at org.txm.concordance.core.functions.Concordance._compute(Concordance.java:319)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2441)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2327)
    at org.txm.rcp.editors.TXMEditor$4.run(TXMEditor.java:977)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
org.txm.searchengine.cqp.clientExceptions.CqiClientException: org.txm.searchengine.cqp.serverException.CqiClErrorInternal:
    at org.txm.searchengine.cqp.corpus.CQPCorpus.query(CQPCorpus.java:1370)
    at org.txm.searchengine.cqp.CQPSearchEngine.query(CQPSearchEngine.java:415)
    at org.txm.concordance.core.functions.Concordance._compute(Concordance.java:319)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2441)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2327)
    at org.txm.rcp.editors.TXMEditor$4.run(TXMEditor.java:977)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.txm.searchengine.cqp.serverException.CqiClErrorInternal:
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:165)
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:67)
    at org.txm.searchengine.cqp.MemCqiClient.cqpQuery(MemCqiClient.java:409)
    at org.txm.searchengine.cqp.corpus.CQPCorpus.query(CQPCorpus.java:1360)
    ... 6 more
TXMResult.compute(): Exception occurs during computing: org.txm.searchengine.cqp.clientExceptions.CqiClientException: org.txm.searchengine.cqp.serverException.CqiClErrorInternal: .
Stacktrace:
[1]   org.txm.core.results.TXMResult.compute TXMResult.java, 2556
[2]   org.txm.core.results.TXMResult.compute TXMResult.java, 2327
[3]  org.txm.rcp.editors.TXMEditor$4.    run TXMEditor.java, 977

Cas B

Concordance de <[^0-9> dans le corpus P1S8...
org.txm.searchengine.cqp.serverException.CqiClErrorRegex:
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:156)
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:67)
    at org.txm.searchengine.cqp.MemCqiClient.cqpQuery(MemCqiClient.java:409)
    at org.txm.searchengine.cqp.corpus.CQPCorpus.query(CQPCorpus.java:1435)
    at org.txm.searchengine.cqp.CQPSearchEngine.query(CQPSearchEngine.java:415)
    at org.txm.concordance.core.functions.Concordance._compute(Concordance.java:331)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2439)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2326)
    at org.txm.rcp.editors.TXMEditor$4.run(TXMEditor.java:979)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
org.txm.searchengine.cqp.clientExceptions.CqiClientException: org.txm.searchengine.cqp.serverException.CqiClErrorRegex:
    at org.txm.searchengine.cqp.corpus.CQPCorpus.query(CQPCorpus.java:1445)
    at org.txm.searchengine.cqp.CQPSearchEngine.query(CQPSearchEngine.java:415)
    at org.txm.concordance.core.functions.Concordance._compute(Concordance.java:331)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2439)
    at org.txm.core.results.TXMResult.compute(TXMResult.java:2326)
    at org.txm.rcp.editors.TXMEditor$4.run(TXMEditor.java:979)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.txm.searchengine.cqp.serverException.CqiClErrorRegex:
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:156)
    at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:67)
    at org.txm.searchengine.cqp.MemCqiClient.cqpQuery(MemCqiClient.java:409)
    at org.txm.searchengine.cqp.corpus.CQPCorpus.query(CQPCorpus.java:1435)
    ... 6 more
TXMResult.compute(): Exception occurs during computing: org.txm.searchengine.cqp.clientExceptions.CqiClientException: org.txm.searchengine.cqp.serverException.CqiClErrorRegex: .
Stacktrace:
[1]   org.txm.core.results.TXMResult.compute TXMResult.java, 2554
[2]   org.txm.core.results.TXMResult.compute TXMResult.java, 2326
[3]  org.txm.rcp.editors.TXMEditor$4.    run TXMEditor.java, 979

History

#1 Updated by Matthieu Decorde 2 months ago

  • Priority changed from Normal to Urgent

Also available in: Atom PDF