View Javadoc
1   package dev.sympho.modular_commands.api.exception;
2   
3   import org.checkerframework.checker.nullness.qual.Nullable;
4   
5   /**
6    * Base type for exceptions related to the command system.
7    *
8    * @version 1.0
9    * @since 1.0
10   */
11  public class CommandException extends RuntimeException {
12  
13      /** Serial UID. */
14      private static final long serialVersionUID = 4017640033490631277L;
15  
16      /**
17       * Constructs a new exception.
18       *
19       * @see RuntimeException#RuntimeException()
20       */
21      public CommandException() {}
22  
23      /**
24       * Constructs a new exception.
25       *
26       * @param message The detail message.
27       * @see RuntimeException#RuntimeException(String)
28       */
29      public CommandException( final String message ) {
30          super( message );
31      }
32  
33      /**
34       * Constructs a new exception.
35       *
36       * @param message The detail message.
37       * @param cause The cause.
38       * @see RuntimeException#RuntimeException(String, Throwable)
39       */
40      public CommandException( final String message, final Throwable cause ) {
41          super( message, cause );
42      }
43  
44      /**
45       * Constructs a new exception.
46       *
47       * @param cause The cause.
48       * @see RuntimeException#RuntimeException(Throwable)
49       */
50      public CommandException( final Throwable cause ) {
51          super( cause );
52      }
53      
54      /**
55       * Constructs a new exception.
56       *
57       * @param message The detail message.
58       * @param cause The cause. May be {@code null}.
59       * @param enableSuppression Whether or not suppression is enabled or disabled.
60       * @param writableStackTrace Whether or not the stack trace should be writable
61       * @see RuntimeException#RuntimeException(String, Throwable, boolean, boolean)
62       */
63      protected CommandException( final String message, final @Nullable Throwable cause,
64              final boolean enableSuppression, final boolean writableStackTrace ) {
65          super( message, cause, enableSuppression, writableStackTrace );
66      }
67      
68  }