db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-5413) NetworkServerControl#main can exit with status 1 without printing an error message to console
Date Thu, 15 Sep 2011 10:20:08 GMT
NetworkServerControl#main can exit with status 1 without printing an error message to console
---------------------------------------------------------------------------------------------

                 Key: DERBY-5413
                 URL: https://issues.apache.org/jira/browse/DERBY-5413
             Project: Derby
          Issue Type: Bug
          Components: Network Server
            Reporter: Dag H. Wanvik


Cf this piece of code in main

catch (Exception e)
{
     //if there was an error, exit(1)
     if ((e.getMessage() == null) ||
         !e.getMessage().equals(NetworkServerControlImpl.UNEXPECTED_ERR) ||
         printErrors
     )
     {
         if (server != null)
             server.consoleExceptionPrint(e);
         else
             e.printStackTrace();  // default output stream is System.out
     }
     // else, we've already printed a trace, so just exit.
     System.exit(1);

The call "server.consoleExceptionPrint(e)" will actually *not* print anything unless the debug
flag "NetworkServerControlImpl#debugOutput" has ben set to true which it isn't a priori. 

I think it should be replaced by a call to server.consoleExceptionPrintTrace(e), which will
print unconditionally.




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message