Commons Email
  1. Commons Email
  2. EMAIL-78

Better error message in MultiPartEmail.attach()

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Labels:
      None

      Description

      Please replace line 367 of org.apache.commons.mail.MultiPartEmail

      [code]
      throw new EmailException("Invalid URL set");
      [code]

      with

      [code]
      throw new EmailException("Invalid URL: "+url, e);
      [code]

      to generate a better error message when an IOException is thrown.

        Activity

        Aaron Digulla created issue -
        Hide
        Corey Scott added a comment -

        Re-throws exceptions as appropriate

        Show
        Corey Scott added a comment - Re-throws exceptions as appropriate
        Corey Scott made changes -
        Field Original Value New Value
        Attachment EMAIL-78-patch.txt [ 12394542 ]
        Siegfried Goeschl made changes -
        Assignee Siegfried Goeschl [ sgoeschl ]
        Siegfried Goeschl made changes -
        Fix Version/s 1.2 [ 12313573 ]
        Hide
        Siegfried Goeschl added a comment -

        Hi Corey, any reason why not to pass the invalid URL parameter into the exception msg?

        Show
        Siegfried Goeschl added a comment - Hi Corey, any reason why not to pass the invalid URL parameter into the exception msg?
        Hide
        Siegfried Goeschl added a comment -

        Applied the patch and added the URL parameter to the exception message.

        Show
        Siegfried Goeschl added a comment - Applied the patch and added the URL parameter to the exception message.
        Siegfried Goeschl made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Corey Scott added a comment -

        Nope, I cant think of a reason why I didnt pass it. Thanks for catching and fixing this.

        Show
        Corey Scott added a comment - Nope, I cant think of a reason why I didnt pass it. Thanks for catching and fixing this.
        Siegfried Goeschl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Siegfried Goeschl
            Reporter:
            Aaron Digulla
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development