tmf: Split the state system in a separate plugin
[deliverable/tracecompass.git] / org.eclipse.linuxtools.statesystem.core / src / org / eclipse / linuxtools / 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.linuxtools.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.linuxtools.statesystem.core.statevalue.ITmfStateValue#getType()}.
26 *
27 * @author Alexandre Montplaisir
28 * @since 3.0
29 */
30 public class StateValueTypeException extends RuntimeException {
31
32 private static final long serialVersionUID = -4548793451746144513L;
33
34 /**
35 * Default constructor
36 */
37 public StateValueTypeException() {
38 super();
39 }
40
41 /**
42 * Constructor with a message
43 *
44 * @param message
45 * Message to attach to this exception
46 */
47 public StateValueTypeException(String message) {
48 super(message);
49 }
50
51 /**
52 * Constructor with both a message and a cause.
53 *
54 * @param message
55 * Message to attach to this exception
56 * @param e
57 * Cause of this exception
58 * @since 3.0
59 */
60 public StateValueTypeException(String message, Throwable e) {
61 super(message, e);
62 }
63 }
This page took 0.033382 seconds and 5 git commands to generate.