1 /*
2 * #%L
3 * MongoDbAuthenticationException.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 * MongoDbAuthenticationException is thrown to report a failure to authenticate
26 * with a MongoDB database.
27 *
28 * @api.yes This class is part of the driver's API. Public and protected members
29 * will be deprecated for at least 1 non-bugfix release (version
30 * numbers are <major>.<minor>.<bugfix>) before being
31 * removed or modified.
32 * @copyright 2012-2013, Allanbank Consulting, Inc., All Rights Reserved
33 */
34 public class MongoDbAuthenticationException extends MongoDbException {
35
36 /** Serialization exception for the class. */
37 private static final long serialVersionUID = 1729264905521755667L;
38
39 /**
40 * Creates a new MongoDbAuthenticationException.
41 */
42 public MongoDbAuthenticationException() {
43 super();
44 }
45
46 /**
47 * Creates a new MongoDbAuthenticationException.
48 *
49 * @param message
50 * Message for the exception.
51 */
52 public MongoDbAuthenticationException(final String message) {
53 super(message);
54 }
55
56 /**
57 * Creates a new MongoDbAuthenticationException.
58 *
59 * @param message
60 * Message for the exception.
61 * @param cause
62 * The cause of the error.
63 */
64 public MongoDbAuthenticationException(final String message,
65 final Throwable cause) {
66 super(message, cause);
67 }
68
69 /**
70 * Creates a new MongoDbAuthenticationException.
71 *
72 * @param cause
73 * The cause of the error.
74 */
75 public MongoDbAuthenticationException(final Throwable cause) {
76 super(cause);
77 }
78 }