Cisco Systems Inc. Confidential

com.pcube.management.framework.rpc
Class RpcErrorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.pcube.management.framework.rpc.RpcErrorException
All Implemented Interfaces:
com.pcube.management.framework.rpc.ConvertsToParameters, java.io.Serializable

public class RpcErrorException
extends java.lang.Exception
implements com.pcube.management.framework.rpc.ConvertsToParameters

A functionality error occurred. This exception is thrown by clients when the an operation request has arrived, the server tried to serve it and encountered with some error. The server then sends the error message and code to the client and the client translates them into this exception class. Any error which is not a communication error that occurred during an RPC session is returned in this encapsulator.



Error codes are mostly application specific but here is a general description that may help you to find your way:

To be continued...

See Also:
Serialized Form

Field Summary
protected  java.lang.Object[] additionalData
           
protected  long code
           
protected  java.lang.String stacktrace
           
 
Constructor Summary
RpcErrorException(long code, java.lang.String message, java.lang.String stacktrace, java.lang.Object[] additionalData)
           
 
Method Summary
 java.lang.Object[] getAdditionalData()
           
 long getCode()
           
 java.lang.String getMessage()
          Returns the error message string of this RPC error.
 java.lang.Object[] getParameters()
           
 java.lang.String[] getSignature()
           
 java.lang.String getStackTrace1()
          Gets the stack trace of the error
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream s)
           
 void printStackTrace(java.io.PrintWriter s)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

code

protected long code

stacktrace

protected java.lang.String stacktrace

additionalData

protected java.lang.Object[] additionalData
Constructor Detail

RpcErrorException

public RpcErrorException(long code,
                         java.lang.String message,
                         java.lang.String stacktrace,
                         java.lang.Object[] additionalData)
Method Detail

getMessage

public java.lang.String getMessage()
Returns the error message string of this RPC error.

Overrides:
getMessage in class java.lang.Throwable
Returns:
The error message that was extracted from the exception on the server

getCode

public long getCode()
Returns:

one of several error codes.

See Also:
SMApiConstants

getAdditionalData

public java.lang.Object[] getAdditionalData()

getStackTrace1

public java.lang.String getStackTrace1()
Gets the stack trace of the error

Returns:
The stack-trace of the error (for debugging) The server usually doesn't send stack traces unless explicitly configured to do so

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Overrides:
printStackTrace in class java.lang.Throwable

getParameters

public java.lang.Object[] getParameters()
Specified by:
getParameters in interface com.pcube.management.framework.rpc.ConvertsToParameters

getSignature

public java.lang.String[] getSignature()
Specified by:
getSignature in interface com.pcube.management.framework.rpc.ConvertsToParameters

Cisco Systems Inc. Confidential