Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-177

Allow fail during init

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.3
    • 1.0.4
    • None
    • None
    • linux

    Description

      It would be handy to be able to fail with a nice message during init, such as 'database not available' or 'no config file found' or whatever.

      At the moment, if you try that during init, you get an IllegalStateException. I've attached a patch which removes this restriction in DaemonLoader, but failing at this stage doesn't stop the c code from calling start. I could work around this in the DaemonLoader, but not sure that is the right approach. I'll have a go at doing a patch for the c-code, but I'm not a confident in my c skills...

      Attachments

        1. allow-init-fail-via-init-exception.diff
          5 kB
          Nick Griffiths
        2. allow-init-fail-via-init-exception-13.diff
          5 kB
          Nick Griffiths
        3. allow-init-fail-via-init-exception-v3.diff
          6 kB
          Nick Griffiths
        4. remove-fail-available-check.diff
          2 kB
          Nick Griffiths
        5. simple-daemon-with-init-exception.diff
          0.6 kB
          Nick Griffiths

        Activity

          People

            Unassigned Unassigned
            nicobrevin Nick Griffiths
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: