01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.core.runtime.IStatus;
14: import org.eclipse.core.runtime.Status;
15:
16: /**
17: * A checked exception indicating a recoverable error occured internal to the
18: * workbench. The status provides a further description of the problem.
19: * <p>
20: * This exception class is not intended to be subclassed by clients.
21: * </p>
22: */
23: public class WorkbenchException extends CoreException {
24:
25: /**
26: * Generated serial version UID for this class.
27: * @since 3.1
28: */
29: private static final long serialVersionUID = 3258125864872129078L;
30:
31: /**
32: * Creates a new exception with the given message.
33: *
34: * @param message the message
35: */
36: public WorkbenchException(String message) {
37: this (new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0,
38: message, null));
39: }
40:
41: /**
42: * Creates a new exception with the given message.
43: *
44: * @param message the message
45: * @param nestedException an exception to be wrapped by this WorkbenchException
46: */
47: public WorkbenchException(String message, Throwable nestedException) {
48: this (new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0,
49: message, nestedException));
50: }
51:
52: /**
53: * Creates a new exception with the given status object. The message
54: * of the given status is used as the exception message.
55: *
56: * @param status the status object to be associated with this exception
57: */
58: public WorkbenchException(IStatus status) {
59: super(status);
60: }
61: }
|