Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.sapia.util;
  
  
  // Import of Sun's JDK classes
  // ---------------------------
This class can be extended by other runtime exception classes that require encapsulating another exception, and provide the latter's stack trace and message instead of its own.

Author(s):
Jean-Cedric Desrochers
Copyright:
Copyright &.169; 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
 
 public class CompositeRuntimeException extends RuntimeException {
   /////////////////////////////////////////////////////////////////////////////////////////
   /////////////////////////////////  INSTANCE ATTRIBUTES  /////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////////////////
 
  
The source error that is encapsulated in this composite exception.
 
   private Throwable _theSourceError;
 
   /////////////////////////////////////////////////////////////////////////////////////////
   ////////////////////////////////////  CONSTRUCTORS  /////////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////////////////
 
  
Creates a new CompositeRuntimeException instance with the arguments passed in.

Parameters:
aMessage The message describing the error.
aSourceError The source error to encapsulate.
 
   public CompositeRuntimeException(String aMessageThrowable aSourceError) {
     super(aMessage);
      = aSourceError;
   }

  
Creates a new CompositeRuntimeException instance with the argument passed in.

Parameters:
aMessage The message describing the error.
 
   public CompositeRuntimeException(String aMessage) {
     super(aMessage);
   }
 
   /////////////////////////////////////////////////////////////////////////////////////////
   //////////////////////////////////  ACCESSOR METHODS  ///////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////////////////
 
  
Returns the source error encapsulated in this composite exception.

Returns:
The source error encapsulated in this composite exception.
 
   public Throwable getSourceError() {
     return ;
   }
 
   /////////////////////////////////////////////////////////////////////////////////////////
   //////////////////////////////////  OVERRIDEN METHODS  //////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////////////////
 
  
Prints the stack trace of this composite exception to the standard error stream.
 
   public void printStackTrace() {
   }

  
Prints the stack trace of this composite exception to the print writer passed in.
 
   public void printStackTrace(PrintWriter anOutput) {
     super.printStackTrace(anOutput);
 
     if ( != null) {
       anOutput.print("\n---> NESTED EXCEPTION IS: ");
       .printStackTrace(anOutput);
     }
   }

  
Prints the stack trace of this composite exception to the print stream passed in.
 
   public void printStackTrace(PrintStream anOutput) {
     super.printStackTrace(anOutput);
 
     if ( != null) {
       anOutput.print("\n---> NESTED EXCEPTION IS: ");
       .printStackTrace(anOutput);
     }
  }
New to GrepCode? Check out our FAQ X