You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@batchee.apache.org by "Alexander Falb (JIRA)" <ji...@apache.org> on 2017/07/07 07:25:00 UTC

[jira] [Resolved] (BATCHEE-123) Exit status on Exception

     [ https://issues.apache.org/jira/browse/BATCHEE-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Falb resolved BATCHEE-123.
------------------------------------
    Resolution: Not A Problem

> Exit status on Exception
> ------------------------
>
>                 Key: BATCHEE-123
>                 URL: https://issues.apache.org/jira/browse/BATCHEE-123
>             Project: BatchEE
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 0.4-incubating
>            Reporter: Alexander Falb
>
> If a batch job throws an arbitrary exception, i think the CLI batchrunner show return a non-zero exit status per default.
> I know, throwing an custom {{RuntimeException}} annotated with {{org.apache.batchee.cli.command.api.Exit}} will do the trick. But wrapping every reader, processor, writer and batchlet in a big try-catch block sounds a bit ugly.
> I would suggest wrapping the whole {{org.apache.batchee.cli.bootstrap.Bootstrap#main}} in a try-catch block, catching {{Exception}}, printing the stacktrace and exiting with some default non-zero exit status.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)