Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5413

NetworkServerControl#main can exit with status 1 without printing an error message to console

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 10.8.1.2
    • 10.8.2.2, 10.9.1.0
    • Network Server
    • None

    Description

      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.

      Attachments

        1. derby-5413.diff
          0.5 kB
          Dag H. Wanvik

        Activity

          People

            dagw Dag H. Wanvik
            dagw Dag H. Wanvik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: