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>
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
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.statesystem
.core
.exceptions
;
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.
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).
23 * To avoid it, always check for the state value's type before attempting to
25 * {@link org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue#getType()}.
27 * @author Alexandre Montplaisir
30 public class StateValueTypeException
extends RuntimeException
{
32 private static final long serialVersionUID
= -4548793451746144513L;
37 public StateValueTypeException() {
42 * Constructor with a message
45 * Message to attach to this exception
47 public StateValueTypeException(String message
) {
52 * Constructor with both a message and a cause.
55 * Message to attach to this exception
57 * Cause of this exception
60 public StateValueTypeException(String message
, Throwable e
) {
This page took 0.045371 seconds and 5 git commands to generate.