All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.xml.rpc.ServiceException Maven / Gradle / Ivy

There is a newer version: 8.0.1
Show newest version
/*
 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package javax.xml.rpc;

/** The javax.xml.rpc.ServiceException is thrown from the
 *  methods in the javax.xml.rpc.Service interface and
 *  ServiceFactory class.
 *
 *  @version 1.0
 *  @author  Rahul Sharma
**/
public class ServiceException extends java.lang.Exception {
  
  private Throwable cause;

  /** Constructs a new exception with null as its 
   *  detail message. The cause is not initialized.
  **/
  public ServiceException() { 
    super();
    this.cause = null;
  }

  /** Constructs a new exception with the specified detail 
   *  message.  The cause is not initialized.
   *  @param message The detail message which is later 
   *                 retrieved using the getMessage method
  **/
  public ServiceException(String message) {
    super(message);
    this.cause = null;
  }

  /** Constructs a new exception with the specified detail 
   *  message and cause.
   *
   *  @param message The detail message which is later retrieved
   *                 using the getMessage method
   *  @param cause   The cause which is saved for the later
   *                 retrieval throw by the getCause 
   *                 method 
  **/ 
  public ServiceException(String message, Throwable cause) {
    super(message);
    this.cause = cause;
  }

  /** Constructs a new exception with the specified cause
   *  and a detail message of (cause==null ? null : 
   *  cause.toString()) (which typically contains the 
   *  class and detail message of cause).
   *
   *  @param cause   The cause which is saved for the later
   *                 retrieval throw by the getCause method.
   *                 (A null value is permitted, and
   *                 indicates that the cause is nonexistent or
     *               unknown.)
  **/ 
  public ServiceException(Throwable cause) {
    super(cause==null ? null : cause.toString());
    this.cause = cause;
  }

  /** Gets the Linked cause
   * 
   *  @return The cause of this Exception or null
   *          if the cause is noexistent or unknown
  **/
  public Throwable getLinkedCause() {
    return this.cause;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy