alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (XIncludeException.scala)

This example Scala source code file (XIncludeException.scala) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

exception, exception, string, string, throwable, throwable, xincludeexception, xincludeexception

The Scala XIncludeException.scala source code

/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2002-2011, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */


package scala.xml
package include

/**
 * <p>
 * <code>XIncludeException is the generic superclass
 * for all checked exceptions that may be thrown as a result
 * of a violation of XInclude's rules.
 * </p>
 * <p>
 * Constructs an <code>XIncludeException with the specified detail
 * message. The error message string <code>message can later be
 * retrieved by the <code>{@link java.lang.Throwable#getMessage}
 * method of class <code>java.lang.Throwable.
 * </p>
 *
 * @param   message   the detail message.
 */
class XIncludeException(message: String) extends Exception(message) {

  /**
   * uses <code>null as its error detail message.
   */
  def this() = this(null)

  private var rootCause: Throwable = null

  /**
   * When an <code>IOException, MalformedURLException 
   * or other generic exception is thrown while processing an XML document
   * for XIncludes, it is customarily replaced
   * by some form of <code>XIncludeException.  
   * This method allows you to store the original exception.
   *
   * @param   nestedException   the underlying exception which 
   * caused the XIncludeException to be thrown
   */
  def setRootCause(nestedException: Throwable ) {
    this.rootCause = nestedException
  }

  /**
   * When an <code>IOException, MalformedURLException 
   * or other generic exception is thrown while processing an XML document
   * for XIncludes, it is customarily replaced
   * by some form of <code>XIncludeException.  
   * This method allows you to retrieve the original exception.
   * It returns null if no such exception caused this <code>XIncludeException.
   *
   * @return Throwable   the underlying exception which caused the
   *                     <code>XIncludeException to be thrown
   */
  def getRootCause(): Throwable = this.rootCause
  
}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala XIncludeException.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.