View Javadoc

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          super(s);
19      }
20  
21      /**
22       * Constructs a new {@code JohnsonException} with the provided message and cause.
23       *
24       * @param s         the exception message
25       * @param throwable the cause
26       */
27      public JohnsonException(String s, Throwable throwable) {
28          super(s, throwable);
29      }
30  
31      /**
32       * Constructs a new {@code JohnsonException} the the provided cause and no message.
33       *
34       * @param throwable the cause
35       */
36      public JohnsonException(Throwable throwable) {
37          super(throwable);
38      }
39  }