[zanata-bugs] [Bug 910199] New: Generate helpful error message when pushing translation for non-existent document

bugzilla at redhat.com bugzilla at redhat.com
Tue Feb 12 00:54:30 UTC 2013


Product: Zanata
https://bugzilla.redhat.com/show_bug.cgi?id=910199

            Bug ID: 910199
           Summary: Generate helpful error message when pushing
                    translation for non-existent document
           Product: Zanata
           Version: development
         Component: Component-Logic
          Severity: unspecified
          Priority: unspecified
          Reporter: sflaniga at redhat.com

Description of problem:

When pushing a translation, if the source document doesn't exist, the client
error message is unhelpful:

Caused by: java.lang.RuntimeException: Failed while pushing document
translations: []
        at
org.zanata.client.commands.push.PushCommand.pushTargetDocToServer(PushCommand.java:526)
        at
org.zanata.client.commands.push.PushCommand.access$100(PushCommand.java:49)
        at
org.zanata.client.commands.push.PushCommand$1.visit(PushCommand.java:348)
        at
org.zanata.client.commands.push.AbstractGettextPushStrategy.visitTranslationResources(AbstractGettextPushS
        at
org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:341)
        at
org.zanata.client.commands.push.PushCommand.run(PushCommand.java:197)
        at
org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:158)
        at org.zanata.maven.PushPullMojo.runCommand(PushPullMojo.java:33)
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:129)
        ... 21 more


Whereas a more useful error message is generated in the server log:

2013-02-12 00:42:08,559 ERROR [org.zanata.process.AsynchronousExecutor]
(DefaultQuartzScheduler_Worker-5) Exception with long running process: A
document was not found.
2013-02-12 00:42:08,559 ERROR
[org.zanata.rest.service.AsynchronousProcessResourceService]
(DefaultQuartzScheduler_Worker-5) Error pushing translations
org.zanata.exception.ZanataServiceException: A document was not found.
        at
org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:438)
        at
org.zanata.service.impl.TranslationServiceImpl.translateAllInDoc(TranslationServiceImpl.java:411)
        ...
        at
org.zanata.service.impl.TranslationServiceImpl_$$_javassist_seam_45.translateAllInDoc(TranslationServiceImpl_$$_javassist_seam_45.java)
        at
org.zanata.rest.service.AsynchronousProcessResourceService$3.run(AsynchronousProcessResourceService.java:267)
        at
org.zanata.rest.service.AsynchronousProcessResourceService$3.run(AsynchronousProcessResourceService.java:253)
        at
org.zanata.process.AsynchronousExecutor.runAsynchronously(AsynchronousExecutor.java:61)
        ...
        at
org.zanata.process.AsynchronousExecutor_$$_javassist_seam_54.runAsynchronously(AsynchronousExecutor_$$_javassist_seam_54.java)


Version-Release number of selected component (if applicable):

zanata-maven-plugin:2.0.1:push
Zanata version 2.1.5-SNAPSHOT (20130212-0019).



How reproducible:


Steps to Reproduce:
1. mvn -e org.zanata:zanata-maven-plugin:2.0.1:push -Dzanata.pushType=trans

Actual results:
A generic error message: 

"Failed while pushing document translations: []"


Expected results:
Error message indicating that the source document does not exist

Additional info:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=zMnXuf9XN1&a=cc_unsubscribe




More information about the zanata-bugs mailing list