James Server
  1. James Server
  2. JAMES-96

Mailet container should not trap exceptions in init()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 2.2.0
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      If a custom mailet throws a RuntimeException in init(), the container traps it and rethrows
      a MessagingException, giving little indication of what occurred. The container really
      ought to provide the stack trace of the failure.

        Activity

        Hide
        Noel J. Bergman added a comment -

        Would you please check this against the current CVS? There is no code that
        would trap a RuntimeException except in the JamesSpoolManager.run(), which
        does provide the stack trace, unless I'm missing it.

        The init() method would be called by the Avalon initialize() method. I would
        expect Avalon to log Throwable coming out of that method. Are you asking for
        James to trap Throwable, log it, and then re-throw it?

        Show
        Noel J. Bergman added a comment - Would you please check this against the current CVS? There is no code that would trap a RuntimeException except in the JamesSpoolManager.run(), which does provide the stack trace, unless I'm missing it. The init() method would be called by the Avalon initialize() method. I would expect Avalon to log Throwable coming out of that method. Are you asking for James to trap Throwable, log it, and then re-throw it?
        Hide
        Noel J. Bergman added a comment -

        Didn't understand the initial complaint until re-reading. Found the problem, which has to do with the nested exception not being rendered. There is a fix in CVS that handles one level of nesting. A better solution would be good, but this should handle most cases.

        Show
        Noel J. Bergman added a comment - Didn't understand the initial complaint until re-reading. Found the problem, which has to do with the nested exception not being rendered. There is a fix in CVS that handles one level of nesting. A better solution would be good, but this should handle most cases.

          People

          • Assignee:
            Unassigned
            Reporter:
            benengber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development