com.unipro.smlib
Class PortConnectionException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--com.unipro.smlib.PortConnectionException
- All Implemented Interfaces:
- java.io.Serializable
- public class PortConnectionException
- extends java.lang.Exception
Occurs when the connection with mobile phone using data cable cannot be established.
(troubles with 'C' connection).
sendMessage() and init() methods of SmsManager class throw this exception.
Exception occurs when:
- There is no connection with mobile phone
- There is no response from mobile for long period of time (10-20 sec)
- SmsManager can't get connection with mobile phone
Additional information about SMLib exceptions: SMLib exceptions.
- See Also:
- Serialized Form
Constructor Summary |
PortConnectionException(java.lang.String er,
int errCode)
Creates new PortConnectionException with the specified error message. |
Method Summary |
java.lang.String |
getMessage()
Returns the message string of the exception. |
int |
getStatus()
Gets exception status. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SMLIB_CLOSED
public static final int SMLIB_CLOSED
- One of exception statuses.
Exception occurred because SMLib was not initialized.
SMLIB_LONG_TIME_FIRST_RESPONSE
public static final int SMLIB_LONG_TIME_FIRST_RESPONSE
- One of exception statuses.
Exception occurred because of long duration response from mobile phone.
SMLIB_LONG_TIME_SECOND_RESPONSE
public static final int SMLIB_LONG_TIME_SECOND_RESPONSE
- One of exception statuses.
Exception occurred because of long duration response from mobile phone.
SMLIB_CONNECT_ERROR
public static final int SMLIB_CONNECT_ERROR
- One of exception statuses.
Exception occurred because of lost connection or communication port error.
PortConnectionException
public PortConnectionException(java.lang.String er,
int errCode)
- Creates new PortConnectionException with the specified error message.
- Parameters:
er
- error message
getStatus
public int getStatus()
- Gets exception status.
- Returns:
- exception status. See SMLIB_XXX constants
getMessage
public java.lang.String getMessage()
- Returns the message string of the exception.
- Overrides:
getMessage
in class java.lang.Throwable
- Returns:
- the message string