Oracle Collaboration Suite Discussions Java API Reference
10g (10.1.1)

Part No. B16232-01


oracle.discussions.sdk
Class TdException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byoracle.discussions.sdk.TdException

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TdConfigurationException

public class TdException
extends java.lang.Exception

Indicates a oracle discussions specific generic exception.

Extends java.lang.Exception. The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.

Sample code snippet illustrating the usage of TdException.

  public void  grantBoardModerator(TdUser tdUser)
   throws TdException
 {
   throw new TdException(TdExceptionConstants.TD_NOT_AUTHORIZED);
 }
 
Since:
OCS 10.1.1
See Also:
Serialized Form

Constructor Summary
TdException(java.lang.String exCode)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Object arg1)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Object arg1, java.lang.Object arg2)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Throwable t)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Throwable t, java.lang.Object arg1)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Throwable t, java.lang.Object[] oa)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Throwable t, java.lang.Object arg1, java.lang.Object arg2)
Constructor for this exception class.
TdException(java.lang.String exCode, java.lang.Throwable t, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
Constructor for this exception class.

Method Summary
java.lang.String getErrorCode()
Returns a message in the US Locale format.
java.lang.Throwable getInternalThrowable()
Returns the internal throwable associated with this exception, null non is defined.
java.lang.String getLocalizedMessage()
Returns a message in the default locale format.
java.lang.String getLocalizedMessage(java.util.Locale l)
Returns a message in the format of the locale passed as an argument.
java.lang.Object[] getParams()
Returns the arguments for the format messaging
void printStackTrace()
Prints the stack trace to the system.err output.
void printStackTrace(java.io.PrintStream s)
Prints the stack trace to a print stream passed as an argument.
void printStackTrace(java.io.PrintWriter pw)
Prints the stack trace to a print writer object passed as an argument.

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, setStackTrace, toString

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TdException

public TdException(java.lang.String exCode)
Constructor for this exception class.

TdException

public TdException(java.lang.String exCode,
                   java.lang.Object arg1)
Constructor for this exception class.
Parameters:
arg1 - argument for the formatting of the message associated with this exception

TdException

public TdException(java.lang.String exCode,
                   java.lang.Object arg1,
                   java.lang.Object arg2)
Constructor for this exception class.
Parameters:
arg1 - argument for the formatting of the message associated with this exception
arg2 - argument for the formatting of the message associated with this exception

TdException

public TdException(java.lang.String exCode,
                   java.lang.Object arg1,
                   java.lang.Object arg2,
                   java.lang.Object arg3)
Constructor for this exception class.
Parameters:
arg1 - argument for the formatting of the message associated with this exception
arg2 - argument for the formatting of the message associated with this exception
arg3 - argument for the formatting of the message associated with this exception

TdException

public TdException(java.lang.String exCode,
                   java.lang.Throwable t)
Constructor for this exception class.
Parameters:
t - throwable that cause this syndication exception to be raised

TdException

public TdException(java.lang.String exCode,
                   java.lang.Throwable t,
                   java.lang.Object arg1)
Constructor for this exception class.
Parameters:
t - throwable that cause this syndication exception to be raised
arg1 - argument for the formatting of the message associated with this exception

TdException

public TdException(java.lang.String exCode,
                   java.lang.Throwable t,
                   java.lang.Object arg1,
                   java.lang.Object arg2)
Constructor for this exception class.
Parameters:
t - throwable that cause this syndication exception to be raised
arg1 - argument for the formatting of the message associated with this exception
arg2 - argument for the formatting of the message associated with this exception

TdException

public TdException(java.lang.String exCode,
                   java.lang.Throwable t,
                   java.lang.Object arg1,
                   java.lang.Object arg2,
                   java.lang.Object arg3)
Constructor for this exception class.
Parameters:
t - throwable that cause this syndication exception to be raised
arg1 - argument for the formatting of the message associated with this exception
arg2 - argument for the formatting of the message associated with this exception
arg3 - argument for the formatting of the message associated with this exception

TdException

public TdException(java.lang.String exCode,
                   java.lang.Throwable t,
                   java.lang.Object[] oa)
Constructor for this exception class.
Parameters:
t - throwable that cause this syndication exception to be raised
oa - array of arguments for the formatting of the message associated with this exception

Method Detail

getInternalThrowable

public java.lang.Throwable getInternalThrowable()
Returns the internal throwable associated with this exception, null non is defined.

printStackTrace

public void printStackTrace()
Prints the stack trace to the system.err output.

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints the stack trace to a print stream passed as an argument.

Used in printing the stacktrace to the console.


printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Prints the stack trace to a print writer object passed as an argument.

Used in printing the stack trace to a file.


getLocalizedMessage

public java.lang.String getLocalizedMessage()
Returns a message in the default locale format. The default locale is the locale where the server is placed.
Returns:
String

getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale l)
Returns a message in the format of the locale passed as an argument.
Returns:
String

getErrorCode

public java.lang.String getErrorCode()
Returns a message in the US Locale format.
Returns:
String public String getMessage() { return getMessagePrivate(Locale.US); } /** Returns the error code associated with this exception

getParams

public java.lang.Object[] getParams()
Returns the arguments for the format messaging
Returns:
Object[] an array of objects

Copyright © 2005, Oracle. All rights reserved.