Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
JsonException |
|
| 1.0;1 |
1 | /* | |
2 | * #%L | |
3 | * JsonException.java - mongodb-async-driver - Allanbank Consulting, Inc. | |
4 | * %% | |
5 | * Copyright (C) 2011 - 2014 Allanbank Consulting, Inc. | |
6 | * %% | |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
8 | * you may not use this file except in compliance with the License. | |
9 | * You may obtain a copy of the License at | |
10 | * | |
11 | * http://www.apache.org/licenses/LICENSE-2.0 | |
12 | * | |
13 | * Unless required by applicable law or agreed to in writing, software | |
14 | * distributed under the License is distributed on an "AS IS" BASIS, | |
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
16 | * See the License for the specific language governing permissions and | |
17 | * limitations under the License. | |
18 | * #L% | |
19 | */ | |
20 | package com.allanbank.mongodb.error; | |
21 | ||
22 | import com.allanbank.mongodb.MongoDbException; | |
23 | ||
24 | /** | |
25 | * JsonException provides an exception to throw when processing JSON documents | |
26 | * fail. | |
27 | * | |
28 | * @api.yes This exception is part of the driver's API. Public and protected | |
29 | * members will be deprecated for at least 1 non-bugfix release | |
30 | * (version numbers are <major>.<minor>.<bugfix>) | |
31 | * before being removed or modified. | |
32 | * @copyright 2012-2013, Allanbank Consulting, Inc., All Rights Reserved | |
33 | */ | |
34 | public class JsonException extends MongoDbException { | |
35 | ||
36 | /** Serialization version of the class. */ | |
37 | private static final long serialVersionUID = 8248891467581639959L; | |
38 | ||
39 | /** | |
40 | * Creates a new JsonParseException. | |
41 | */ | |
42 | public JsonException() { | |
43 | 2 | super(); |
44 | 2 | } |
45 | ||
46 | /** | |
47 | * Creates a new JsonParseException. | |
48 | * | |
49 | * @param message | |
50 | * Reason for the exception. | |
51 | */ | |
52 | public JsonException(final String message) { | |
53 | 4 | super(message); |
54 | 4 | } |
55 | ||
56 | /** | |
57 | * Creates a new JsonParseException. | |
58 | * | |
59 | * @param message | |
60 | * Reason for the exception. | |
61 | * @param cause | |
62 | * The exception causing the MongoDbException. | |
63 | */ | |
64 | public JsonException(final String message, final Throwable cause) { | |
65 | 14 | super(message, cause); |
66 | 14 | } |
67 | ||
68 | /** | |
69 | * Creates a new JsonParseException. | |
70 | * | |
71 | * @param cause | |
72 | * The exception causing the MongoDbException. | |
73 | */ | |
74 | public JsonException(final Throwable cause) { | |
75 | 23 | super(cause); |
76 | 23 | } |
77 | } |