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    *
10   * @since 0.3
11   */
12  public final class ValidationException extends Exception {
13  
14      /**
15       * Serialization marker.
16       */
17      private static final long serialVersionUID = 0x75298A7876D21470L;
18  
19      /**
20       * Public ctor.
21       *
22       * @param cause The cause of exception
23       */
24      public ValidationException(final Throwable cause) {
25          this(null, cause);
26      }
27  
28      /**
29       * Public ctor.
30       *
31       * @param text The text of the exception
32       */
33      public ValidationException(final String text) {
34          this(text, null);
35      }
36  
37      /**
38       * Primary ctor.
39       *
40       * @param text The text of the exception
41       * @param cause The cause of exception
42       */
43      private ValidationException(final String text, final Throwable cause) {
44          super(text, cause);
45      }
46  }