com.nmt.mgp
Class MgpException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.nmt.mgp.MgpException
All Implemented Interfaces:
java.io.Serializable

public class MgpException
extends java.lang.Exception

Exception thrown when an error has occured.

Errors may be be on the application-level or on a lower protocol-level.
There may be a numeric error code assoicated with the exception to indicate the exact error.
By default errno is set to Mgp.MGP_ERR_UNKNOWN.

See Also:
Serialized Form

Constructor Summary
MgpException()
           
MgpException(int errno)
           
MgpException(int errno, java.lang.String msg)
           
MgpException(java.lang.String msg)
           
 
Method Summary
 int getErrno()
          Returns the numeric error code.
 java.lang.String toString()
          Returns the error message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MgpException

public MgpException()

MgpException

public MgpException(java.lang.String msg)
Parameters:
msg - string representation

MgpException

public MgpException(int errno)
Parameters:
errno - numeric error code

MgpException

public MgpException(int errno,
                    java.lang.String msg)
Parameters:
errno - numeric error code
msg - string representation
Method Detail

getErrno

public int getErrno()
Returns the numeric error code.


toString

public java.lang.String toString()
Returns the error message.

Overrides:
toString in class java.lang.Throwable