Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: fcf9f42e6fb43894d096400c86f9e0a184875c79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*******************************************************************************
 * Copyright (c) 2012 Wind River Systems, Inc. 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:
 * Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.tcf.te.launch.core.exceptions;

/**
 * Exception thrown by the launch configuration management service to
 * signal a service failure.
 */
public class LaunchServiceException extends Exception {

    private static final long serialVersionUID = 4847722803200503842L;

	/**
	 * Default type for this exception.
	 */
	public final static int TYPE_NO_DETAILED_REASON = 0;

	/**
	 * Exception type when mandatory attributes in launch configuration is missing.
	 */
	public final static int TYPE_MISSING_LAUNCH_CONFIG_ATTR = 1;

	/**
	 * Exception type when mandatory attributes in launch specification is missing.
	 */
	public final static int TYPE_MISSING_LAUNCH_SPEC_ATTR = 2;

	private int typeId = TYPE_NO_DETAILED_REASON;

	/**
	 * Default Constructor.
	 */
	public LaunchServiceException() {
		super();
	}

	/**
	 * Constructor.
	 *
	 * @param message Additional detail message describing the cause of the exception.
	 */
	public LaunchServiceException(String message) {
		super(message);
	}

	/**
	 * Constructor.
	 *
	 * @param message Additional detail message describing the cause of the exception.
	 * @param typeId Additional information to distinguish different exceptions thrown from one method.
	 */
	public LaunchServiceException(String message, int typeId) {
		super(message);
		this.typeId = typeId;
	}

	/**
	 * Constructor.
	 *
	 * @param cause Additional <code>Throwable</code> which was the cause of this exception.
	 */
	public LaunchServiceException(Throwable cause) {
		super(cause);
	}

	/**
	 * Constructor.
	 *
	 * @param message Additional detail message describing the cause of the exception.
	 * @param cause Additional <code>Throwable</code> which was the cause of this exception.
	 */
	public LaunchServiceException(String message, Throwable cause) {
		super(message, cause);
	}

	/**
	 * Returns the type of this exception.
	 */
	public int getType() {
		return typeId;
	}
}

Back to the top