You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Guillaume Chauvet (JIRA)" <ji...@apache.org> on 2016/11/06 10:04:58 UTC

[jira] [Commented] (DAEMON-344) prunsrv swallows uncaught exceptions

    [ https://issues.apache.org/jira/browse/DAEMON-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641521#comment-15641521 ] 

Guillaume Chauvet commented on DAEMON-344:
------------------------------------------

Could you provide a full unit test ? (i.e jar + command line used to deploy and run it)

> prunsrv swallows uncaught exceptions
> ------------------------------------
>
>                 Key: DAEMON-344
>                 URL: https://issues.apache.org/jira/browse/DAEMON-344
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.10, 1.0.15
>            Reporter: Harald Kirsch
>
> This seems to be similar to DAEMON-165, but I do not have the right to reopen it.
> Write a main method like this:
> {code:java}
> public static void main(String[] args) throws Exception {
>   throw new Exception("bad luck");
> }
> {code}
> If started as a service, the service will keep running as if everything is ok.
> Workaround: wrap all code into a try/catch(Throwable) and print/log the throwable in the Java code itself. Then exit normally, which will then actually prompt prunsrv to exit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)