Bug 1009779 - zanata-cli should show the filename of corrupted file
Summary: zanata-cli should show the filename of corrupted file
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-zanata-client
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: David Mason
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-19 07:26 UTC by Ding-Yi Chen
Modified: 2015-07-31 01:24 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-31 01:24:07 UTC


Attachments (Terms of Use)
Sample files that trigger this bug (2.09 KB, application/x-gzip)
2013-09-19 07:26 UTC, Ding-Yi Chen
no flags Details

Description Ding-Yi Chen 2013-09-19 07:26:59 UTC
Created attachment 799758 [details]
Sample files that trigger this bug

Description of problem:
When encounter a corrupted file, zanata failed to show the filename.
Moreover, the error message is so misleading that user have no way to find the actual corrupted file.

For example, the project looks like:
pot/About_Fedora.pot
de/About_Fedora.po
ja/About_Fedora.po

Suppose ja/About_Fedora.po is corrupted, pushing this project you will get:

[INFO] Pushing target doc [name=About_Fedora size=24 client-locale=de] to server [locale=de]
Done in 4 secs
[ERROR] Execution failed:
java.lang.RuntimeException: Operation failed.

    To retry from the last document, please set the following option(s):

        --from-doc "About_Fedora"

.
        at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:459)
        at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:207)
        at org.zanata.client.commands.ArgsUtil.runCommand(ArgsUtil.java:56)
        at org.zanata.client.ZanataClient.processArgs(ZanataClient.java:164)
        at org.zanata.client.ZanataClient.main(ZanataClient.java:90)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

It does not show any thing that ja/About_Fedora.po is corrupted.

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

How reproducible:
Always

Steps to Reproduce:
1. Download and extract the attached file.
2. cd AboutFedora
3. Create project: AboutFedora and version: f13
4. zanata-cli -B  -e  push -s pot -t . --push-type both


Actual results:
[INFO] pushing source doc [name=About_Fedora size=24] to server
Done in 4 secs
[INFO] Pushing target doc [name=About_Fedora size=24 client-locale=de] to server [locale=de]
Done in 4 secs
[ERROR] Execution failed:
java.lang.RuntimeException: Operation failed.

    To retry from the last document, please set the following option(s):

        --from-doc "About_Fedora"

.
        at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:459)
        at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:207)
        at org.zanata.client.commands.ArgsUtil.runCommand(ArgsUtil.java:56)
        at org.zanata.client.ZanataClient.processArgs(ZanataClient.java:164)
        at org.zanata.client.ZanataClient.main(ZanataClient.java:90)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1



Expected results:
Fail to read ja/About_Fedora.po

Additional info:

Comment 1 Zanata Migrator 2015-07-31 01:24:07 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-483


Note You need to log in before you can comment on or make changes to this bug.