1 /*
2  * Copyright 2017, OpenCensus Authors
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 io.opencensus.trace.propagation;
18 
19 /**
20  * Exception thrown when a {@link io.opencensus.trace.SpanContext} cannot be parsed.
21  *
22  * @since 0.7
23  */
24 public final class SpanContextParseException extends Exception {
25   private static final long serialVersionUID = 0L;
26 
27   /**
28    * Constructs a new {@code SpanContextParseException} with the given message.
29    *
30    * @param message a message describing the parse error.
31    * @since 0.7
32    */
SpanContextParseException(String message)33   public SpanContextParseException(String message) {
34     super(message);
35   }
36 
37   /**
38    * Constructs a new {@code SpanContextParseException} with the given message and cause.
39    *
40    * @param message a message describing the parse error.
41    * @param cause the cause of the parse error.
42    * @since 0.7
43    */
SpanContextParseException(String message, Throwable cause)44   public SpanContextParseException(String message, Throwable cause) {
45     super(message, cause);
46   }
47 }
48