org.netbeans.mdr.persistence
Class RuntimeStorageException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.netbeans.mdr.persistence.RuntimeStorageException
All Implemented Interfaces:
java.io.Serializable

public class RuntimeStorageException
extends java.lang.RuntimeException

This is thrown when a StorageException needs to be thrown across a boundary that does not allow checked exceptions: for instance, when using a Collections interface to iterate through a set of MDR objects. The StorageException is converted to a RuntimeStorageException. A RuntimeStorageException returns the stack trace information of the original StorageException occurred, since this is far more useful than the stack trace of the point where the exception was converted.

See Also:
Serialized Form

Constructor Summary
RuntimeStorageException(StorageException err)
          this constructs a RuntimeStorageException from an StorageException
 
Method Summary
 java.lang.String getLocalizedMessage()
          return the original StorageException's localized message
 java.lang.String getMessage()
          return the original StorageException's message
 void printStackTrace()
          print the original StorageException's stack trace
 void printStackTrace(java.io.PrintStream ps)
          print the original StorageException's stack trace
 void printStackTrace(java.io.PrintWriter pw)
          print the original StorageException's stack trace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuntimeStorageException

public RuntimeStorageException(StorageException err)
this constructs a RuntimeStorageException from an StorageException

Parameters:
err - the StorageException
Method Detail

getMessage

public java.lang.String getMessage()
return the original StorageException's message

Overrides:
getMessage in class java.lang.Throwable

getLocalizedMessage

public java.lang.String getLocalizedMessage()
return the original StorageException's localized message

Overrides:
getLocalizedMessage in class java.lang.Throwable

printStackTrace

public void printStackTrace()
print the original StorageException's stack trace

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
print the original StorageException's stack trace

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
print the original StorageException's stack trace

Overrides:
printStackTrace in class java.lang.Throwable


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.