Hi Hut,

In simple terms...

This is a standard Java feature.

The compiler knows that one or more calls in your method can throw a
particular Exception.

You either need to implement a try/catch block around that/those methods, or
declare that your method can throw that kind of Exception.

-Chris

> -----Original Message-----
> From: Hut Carspecken [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 23, 2003 6:22 PM
> To: James Users List
> Subject: How To: forward Content of a message
>
>
> Hello Again,
>
> Just one last question I promise.  I want to forward the content
> of MimeMessage unchanged.  I am having trouble with a compile
> error that states a thrown type needs to be declared.
>
> Is there a quick and easy way of simply forwarding a message content?
>
> Code:
> MimeMessage original_msg = mail.getMessage();
> Object original_content = original_msg.getContent();
>
> This is the error that i get:
> unreported exception javax.mail.MessagingException; must be
> caught or declared to be thrown
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to