OSDN Git Service

android-2.1_r1 snapshot
[android-x86/sdk.git] / ddms / libs / ddmlib / src / com / android / ddmlib / log / InvalidValueTypeException.java
1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package com.android.ddmlib.log;
18
19 import com.android.ddmlib.log.EventContainer.EventValueType;
20 import com.android.ddmlib.log.EventValueDescription.ValueType;
21
22 import java.io.Serializable;
23
24 /**
25  * Exception thrown when associating an {@link EventValueType} with an incompatible
26  * {@link ValueType}.
27  */
28 public final class InvalidValueTypeException extends Exception {
29
30     /**
31      * Needed by {@link Serializable}.
32      */
33     private static final long serialVersionUID = 1L;
34
35     /**
36      * Constructs a new exception with the default detail message.
37      * @see java.lang.Exception
38      */
39     public InvalidValueTypeException() {
40         super("Invalid Type");
41     }
42
43     /**
44      * Constructs a new exception with the specified detail message.
45      * @param message the detail message. The detail message is saved for later retrieval
46      * by the {@link Throwable#getMessage()} method.
47      * @see java.lang.Exception
48      */
49     public InvalidValueTypeException(String message) {
50         super(message);
51     }
52
53     /**
54      * Constructs a new exception with the specified cause and a detail message of
55      * <code>(cause==null ? null : cause.toString())</code> (which typically contains
56      * the class and detail message of cause).
57      * @param cause the cause (which is saved for later retrieval by the
58      * {@link Throwable#getCause()} method). (A <code>null</code> value is permitted,
59      * and indicates that the cause is nonexistent or unknown.)
60      * @see java.lang.Exception
61      */
62     public InvalidValueTypeException(Throwable cause) {
63         super(cause);
64     }
65
66     /**
67      * Constructs a new exception with the specified detail message and cause.
68      * @param message the detail message. The detail message is saved for later retrieval
69      * by the {@link Throwable#getMessage()} method.
70      * @param cause the cause (which is saved for later retrieval by the
71      * {@link Throwable#getCause()} method). (A <code>null</code> value is permitted,
72      * and indicates that the cause is nonexistent or unknown.)
73      * @see java.lang.Exception
74      */
75     public InvalidValueTypeException(String message, Throwable cause) {
76         super(message, cause);
77     }
78 }