View Javadoc
1   /*
2    * SPDX-FileCopyrightText: Copyright (c) 2011-2026 Yegor Bugayenko
3    * SPDX-License-Identifier: MIT
4    */
5   package com.qulice.spi;
6   
7   /**
8    * Exception thrown by a validator, if it fails.
9    * @since 0.3
10   */
11  public final class ValidationException extends Exception {
12  
13      /**
14       * Serialization marker.
15       */
16      private static final long serialVersionUID = 0x75298A7876D21470L;
17  
18      /**
19       * Public ctor.
20       * @param cause The cause of exception
21       */
22      public ValidationException(final Throwable cause) {
23          this(null, cause);
24      }
25  
26      /**
27       * Public ctor.
28       * @param text The text of the exception
29       */
30      public ValidationException(final String text) {
31          this(text, null);
32      }
33  
34      /**
35       * Primary ctor.
36       * @param text The text of the exception
37       * @param cause The cause of exception
38       */
39      private ValidationException(final String text, final Throwable cause) {
40          super(text, cause);
41      }
42  }