javax.mail.internet
public class: AddressException [javadoc |
source]
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.mail.MessagingException
javax.mail.internet.ParseException
javax.mail.internet.AddressException
All Implemented Interfaces:
Serializable
The exception thrown when a wrongly formatted address is encountered.
- author:
Bill
- Shannon
- author:
Max
- Spivak
Field Summary |
---|
protected String | ref | The string being parsed. |
protected int | pos | The index in the string where the error occurred, or -1 if not known. |
Methods from java.lang.Throwable: |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.mail.internet.AddressException Detail: |
public int getPos() {
return pos;
}
Get the position with the reference string where the error was
detected (-1 if not relevant). |
public String getRef() {
return ref;
}
Get the string that was being parsed when the error was detected
(null if not relevant). |
public String toString() {
String s = super.toString();
if (ref == null)
return s;
s += " in string ``" + ref + "''";
if (pos < 0)
return s;
return s + " at position " + pos;
}
|