Due to other problems, I found a problem with OmegaT in console mode. The call stack was unclear, making it hard to decipher a problem:
Source file loading complete Loading TMX files... Validating tags An error has occured: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
Quite hard to decipher what was going wrong.
Suggested change 1:
Extend the exception handler in the last try-catch of runConsoleTranslate, runCreatePseudoTranslateTMX and runConsoleAlign by
} catch (Exception e)) { Log.log(e) ... System.exit... }
Suggested change 2:
It might be a good moment to check whether the whole code form Log.log(e) upto System.exit(1) should move into a separate procedure.
Suggested change 3:
It might be a good moment to change showError such that when in console mode, it always prints the full stack:
case CONSOLE_TRANSLATE: System.err.println(msg); <<<--- here break;
Implemented in SVN (/trunk).
Errors are now better collected and reported.
At the end of the process, if an error occurs, a message is printed:
An error occurred while trying to run console process: {0}
For details, see the technical implementation:
https://sourceforge.net/p/omegat/svn/6000/
Didier
Implemented in the released version 3.1.0 of OmegaT.
Didier