blob: 0dd9796784b5d4088ba5b60496f26b017d6985a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package com.libmailcore;
public class MailException extends Exception {
/**
Error code.
@see com.libmailcore.ErrorCode
*/
public int errorCode()
{
return errorCode;
}
/** Constructor of an exception with the given code and message. */
public MailException(String message, int anErrorCode)
{
super(message);
errorCode = anErrorCode;
}
/** Constructor of an exception with the given code. It will generate a message based on the code. */
public MailException(int anErrorCode)
{
super(messageForErrorCode(anErrorCode));
errorCode = anErrorCode;
}
private static native String messageForErrorCode(int errorCode);
private int errorCode;
}
|