Oracle Discussions Java API Reference
10g Release 1 (10.1.2)

B25496-01

oracle.discussions.sdk
Class TdException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--oracle.discussions.sdk.TdException
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

Field Summary
protected  java.lang.String _exCode
           
protected static java.util.Hashtable _htRb
           
protected  java.lang.Object[] _oaParams
           
protected  java.lang.Throwable _tInternal
           

 

Constructor Summary
protected TdException()
           
  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.
protected  java.lang.String getMessagePrivate(java.util.Locale loc)
          Returns a exception message in the locale specific format.
 java.lang.Object[] getParams()
          Returns the arguments for the format messaging
protected  java.util.ResourceBundle getResourceBundle(java.util.Locale loc)
          Returns the resource bundle which is used in formatting the messages, given the locale.
protected  java.lang.String getResourceBundleName()
          Returns the name of the ResourceBundle to be used by this subclass of the TdException.
 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, getMessage, toString

 

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

 

Field Detail

_exCode

protected java.lang.String _exCode

_oaParams

protected java.lang.Object[] _oaParams

_tInternal

protected java.lang.Throwable _tInternal

_htRb

protected static java.util.Hashtable _htRb

Constructor Detail

TdException

protected TdException()

TdException

public TdException(java.lang.String exCode)
Constructor for this exception class.
Parameters:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.

TdException

public TdException(java.lang.String exCode,
                   java.lang.Object arg1)
Constructor for this exception class.
Parameters:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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:
exCode - identifies the exception code associated with this exception. it will be used as a key into the exception resource bundle to get the localized execptin message.
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.
Overrides:
printStackTrace in class java.lang.Throwable

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.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - printstream

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.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
pw - printwriter

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.
Overrides:
getLocalizedMessage in class java.lang.Throwable
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.
Parameters:
l - Locale
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

getResourceBundleName

protected java.lang.String getResourceBundleName()
Returns the name of the ResourceBundle to be used by this subclass of the TdException. e.g. "oracle.discussions.exmsgs.XXXMessages"
Returns:
String

getMessagePrivate

protected java.lang.String getMessagePrivate(java.util.Locale loc)
Returns a exception message in the locale specific format.
Parameters:
Locale -  
Returns:
String

getResourceBundle

protected final java.util.ResourceBundle getResourceBundle(java.util.Locale loc)
                                                    throws java.util.MissingResourceException
Returns the resource bundle which is used in formatting the messages, given the locale.
Parameters:
Locale -  
Returns:
ResourceBundle

Oracle Discussions Java API Reference
10g Release 1 (10.1.2)

B25496-01

Copyright © 2002, 2005, Oracle. All rights reserved.