statesystem: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / statesystem / org.eclipse.tracecompass.statesystem.core / src / org / eclipse / tracecompass / statesystem / core / exceptions / StateValueTypeException.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2014 Ericsson
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
5 *
6 * All rights reserved. This program and the accompanying materials are
7 * made available under the terms of the Eclipse Public License v1.0 which
8 * accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.statesystem.core.exceptions;
14
15 /**
16 * The StateValue is a wrapper around the different type of values that can be
17 * used and stored in the state system and history. "Unboxing" the value means
18 * retrieving the base type (int, String, etc.) inside it.
19 *
20 * This exception is thrown if the user tries to unbox a StateValue with an
21 * incorrect type (for example, tries to read a String value as an Int).
22 *
23 * To avoid it, always check for the state value's type before attempting to
24 * unbox it, via
25 * {@link org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue#getType()}.
26 *
27 * @author Alexandre Montplaisir
28 */
29 public class StateValueTypeException extends RuntimeException {
30
31 private static final long serialVersionUID = -4548793451746144513L;
32
33 /**
34 * Default constructor
35 */
36 public StateValueTypeException() {
37 super();
38 }
39
40 /**
41 * Constructor with a message
42 *
43 * @param message
44 * Message to attach to this exception
45 */
46 public StateValueTypeException(String message) {
47 super(message);
48 }
49
50 /**
51 * Constructor with both a message and a cause.
52 *
53 * @param message
54 * Message to attach to this exception
55 * @param e
56 * Cause of this exception
57 */
58 public StateValueTypeException(String message, Throwable e) {
59 super(message, e);
60 }
61 }
This page took 0.034058 seconds and 5 git commands to generate.