1 /*
2 * SPDX-FileCopyrightText: Copyright (c) 2011-2025 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 * @param text The text of the exception
22 * @param args Optional arguments for String.format()
23 */
24 public ValidationException(final String text, final Object... args) {
25 super(String.format(text, args));
26 }
27
28 /**
29 * Public ctor.
30 * @param cause The cause of exception
31 */
32 public ValidationException(final Throwable cause) {
33 super(cause);
34 }
35
36 }