com.sage.accpac.sm
Class DBLinkException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sage.accpac.sm.DBLinkException
All Implemented Interfaces:
java.io.Serializable

@NotThreadSafe
public class DBLinkException
extends java.lang.RuntimeException

The exception that is thrown when a call to any methods of the DBLink fails. It provides access to the original error code from the database layer.

See Also:
Serialized Form

Constructor Summary
DBLinkException()
          constructs an instance of DBLinkException with a return code of success.
DBLinkException(int returnCode)
          constructs an instance of DBLinkException with the specified return code;
DBLinkException(int returnCode, java.lang.String message)
          constructs an instance of DBLinkException with the specified return code and message;
 
Method Summary
 java.lang.String getMessage()
          
 int getReason()
          gets the original database layer error
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBLinkException

public DBLinkException()
constructs an instance of DBLinkException with a return code of success.


DBLinkException

public DBLinkException(int returnCode)
constructs an instance of DBLinkException with the specified return code;

Parameters:
returnCode - the return code (as will be returned by getReason())

DBLinkException

public DBLinkException(int returnCode,
                       java.lang.String message)
constructs an instance of DBLinkException with the specified return code and message;

Parameters:
returnCode - the return code (as will be returned by getReason()
message - the message (as will be returned by getMessage())
Method Detail

getReason

public int getReason()
gets the original database layer error

Returns:
the underlying return code that caused the exception

getMessage

public java.lang.String getMessage()

Overrides:
getMessage in class java.lang.Throwable


Copyright © 2011 Sage Software, Inc. All rights reserved.