1 package com.atlassian.johnson;
2
3 /**
4 * Base class for all exceptions thrown by Johnson.
5 * <p/>
6 * Note: This base class explicitly disallows the construction of exceptions without a message, a throwable or both.
7 *
8 * @since 2.0
9 */
10 public class JohnsonException extends RuntimeException
11 {
12 /**
13 * Constructs a new {@code JohnsonException} with the provided message.
14 *
15 * @param s the exception message
16 */
17 public JohnsonException(String s)
18 {
19 super(s);
20 }
21
22 /**
23 * Constructs a new {@code JohnsonException} with the provided message and cause.
24 *
25 * @param s the exception message
26 * @param throwable the cause
27 */
28 public JohnsonException(String s, Throwable throwable)
29 {
30 super(s, throwable);
31 }
32
33 /**
34 * Constructs a new {@code JohnsonException} the the provided cause and no message.
35 *
36 * @param throwable the cause
37 */
38 public JohnsonException(Throwable throwable)
39 {
40 super(throwable);
41 }
42 }