Derby
  1. Derby
  2. DERBY-5413

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.2.2, 10.9.1.0
    • Component/s: Network Server
    • Labels:
      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.

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

        Activity

          People

          • Assignee:
            Dag H. Wanvik
            Reporter:
            Dag H. Wanvik
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development