com.flexive.shared.exceptions
Class FxRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.flexive.shared.exceptions.FxRuntimeException
All Implemented Interfaces:
FxLocalizedException, java.io.Serializable

public class FxRuntimeException
extends java.lang.RuntimeException
implements FxLocalizedException

Runtime exception base class, wrapping a checked flexive exception.

Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Field Summary
protected  FxApplicationException converted
           
 
Constructor Summary
FxRuntimeException(FxApplicationException converted)
          Localized exception constructor.
 
Method Summary
 FxApplicationException getConverted()
           
 FxExceptionMessage getExceptionMessage()
          Get the underlying exception message object
 java.lang.String getMessage()
          Get the localized message in the default locale (english)
 java.lang.String getMessage(FxLanguage locale)
          Get the localized message for a locale
 java.lang.String getMessage(long localeId)
          Get the localized message for a localeId
 java.lang.String getMessage(UserTicket ticket)
          Get the localized message for a calling users locale
 java.lang.StackTraceElement[] getStackTrace()
           
protected  boolean messageLogged()
          Has the message been logged?
 void printStackTrace(java.io.PrintStream s)
           
 void printStackTrace(java.io.PrintWriter s)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

converted

protected FxApplicationException converted
Constructor Detail

FxRuntimeException

FxRuntimeException(FxApplicationException converted)
Localized exception constructor. Package-protected - use FxApplicationException.asRuntimeException() for creating run-time exceptions.

Parameters:
converted - the message to convert
Method Detail

messageLogged

protected boolean messageLogged()
Has the message been logged?

Returns:
message logged

getStackTrace

public java.lang.StackTraceElement[] getStackTrace()
Overrides:
getStackTrace in class java.lang.Throwable

printStackTrace

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

printStackTrace

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

getMessage

public java.lang.String getMessage()
Get the localized message in the default locale (english)

Specified by:
getMessage in interface FxLocalizedException
Overrides:
getMessage in class java.lang.Throwable
Returns:
localized message

getMessage

public java.lang.String getMessage(FxLanguage locale)
Get the localized message for a locale

Specified by:
getMessage in interface FxLocalizedException
Parameters:
locale - locale to get the message got
Returns:
localized message

getMessage

public java.lang.String getMessage(long localeId)
Get the localized message for a localeId

Specified by:
getMessage in interface FxLocalizedException
Parameters:
localeId - locale id to get the message for
Returns:
localized message

getMessage

public java.lang.String getMessage(UserTicket ticket)
Get the localized message for a calling users locale

Specified by:
getMessage in interface FxLocalizedException
Parameters:
ticket - calling users ticket, used to get the locale for the message from
Returns:
localized message

getExceptionMessage

public FxExceptionMessage getExceptionMessage()
Get the underlying exception message object

Specified by:
getExceptionMessage in interface FxLocalizedException
Returns:
underlying exception message object

getConverted

public FxApplicationException getConverted()