commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harald Kirsch (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DAEMON-344) prunsrv swallows uncaught exceptions
Date Wed, 30 Mar 2016 09:19:26 GMT
Harald Kirsch created DAEMON-344:
------------------------------------

             Summary: 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.15, 1.0.10
            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)

Mime
View raw message