diff options
author | kchong | 2006-07-19 04:02:24 +0000 |
---|---|---|
committer | kchong | 2006-07-19 04:02:24 +0000 |
commit | 584a95fd0a580c9f0707940f3eca749523a09d91 (patch) | |
tree | aeb7fe140471b2fb0be467f3ccdf5d3b533c53cf /bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIException.java | |
parent | a28ca0976ccced446c29a6d1ae24dce6007725fc (diff) | |
download | webtools.webservices-20060719_0526.tar.gz webtools.webservices-20060719_0526.tar.xz webtools.webservices-20060719_0526.zip |
This commit was manufactured by cvs2svn to create tag 'v20060719_0526'.v20060719_0526
Diffstat (limited to 'bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIException.java')
-rw-r--r-- | bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIException.java | 151 |
1 files changed, 0 insertions, 151 deletions
diff --git a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIException.java b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIException.java deleted file mode 100644 index e6e8db4b5..000000000 --- a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIException.java +++ /dev/null @@ -1,151 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2002-2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM - Initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.wsi.internal.core; - -import java.lang.reflect.InvocationTargetException; -import java.util.MissingResourceException; - -/** - * Primary WS-I exception. - * - * @version 1.0.1 - * @author Peter Brittenham - */ -public class WSIException extends Exception -{ - - /** - * Static needed for serializable class - */ - private static final long serialVersionUID = 5446823222767299308L; - - /** - * Throwable. - */ - protected Throwable throwable = null; - - /** - * Create an exception without a message. - */ - public WSIException() - { - // Exception - super(); - } - - /** - * Create an exception with a message. - * - * @param msg the exception message - */ - public WSIException(String msg) - { - // Exception - super(msg); - } - - /** - * Create an exception with a message and related exception. - * - * @param msg the exception message - * @param throwable throwable that is related to this exception - */ - public WSIException(String msg, Throwable throwable) - { - // Exception - super(msg); - - // Save input reference - this.throwable = throwable; - } - - /** - * Returns the String representation of this object's values. - * - * @return Returns the detail message of this throwable object. - */ - public String getMessage() - { - return super.getMessage(); - } - - /** - * Returns the String representation of this object's values. - * - * @return Returns the detail message of this throwable object. - */ - public String toString() - { - //StringWriter sw; - //PrintWriter pw; - - // Always get message from super class - String msg = super.getMessage(); - - // If this exception contains a reference to another exception, - // then add it to the message - if (throwable != null) - { - msg += "\n" - + "------------------------------------------------------------------------------\n" - + " Nested exception is: \n\n " - + throwable.toString() - + "\n"; - - // If throwable is MissingResourceException, - // then add class name and key to output - if (throwable instanceof MissingResourceException) - { - MissingResourceException mre = (MissingResourceException) throwable; - - // Get class name and key - msg += " - " - + mre.getKey() - + "\n\t" - + "[Class Name: " - + mre.getClassName() - + "]"; - } - - // If throwable is InvocationTargetException, - // then target of exception - else if (throwable instanceof InvocationTargetException) - { - InvocationTargetException ite = (InvocationTargetException) throwable; - - // Get target - msg += " - " + ite.getTargetException().toString(); - } - - // ADD: Print stack trace - //sw = new StringWriter(); - //pw = new PrintWriter(sw); - //throwable.printStackTrace(pw); - - // Add it to the message - //msg += sw.toString(); - } - - // Return message - return msg; - } - - /** - * Returns the exception that caused this exception to be created. - * - * @return Returns the encapsulated throwable object. - */ - public Throwable getTargetException() - { - // Return throwable - return throwable; - } -} |