001/*
002 *  Copyright (c) 2023-2026, Agents-Flex (fuhai999@gmail.com).
003 *  <p>
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *  <p>
008 *  http://www.apache.org/licenses/LICENSE-2.0
009 *  <p>
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package com.agentsflex.core.model.rerank;
017
018public class RerankException extends RuntimeException {
019
020    /**
021     * Constructs a new runtime exception with {@code null} as its
022     * detail message.  The cause is not initialized, and may subsequently be
023     * initialized by a call to {@link #initCause}.
024     */
025    public RerankException() {
026    }
027
028    /**
029     * Constructs a new runtime exception with the specified detail message.
030     * The cause is not initialized, and may subsequently be initialized by a
031     * call to {@link #initCause}.
032     *
033     * @param message the detail message. The detail message is saved for
034     *                later retrieval by the {@link #getMessage()} method.
035     */
036    public RerankException(String message) {
037        super(message);
038    }
039
040    /**
041     * Constructs a new runtime exception with the specified detail message and
042     * cause.  <p>Note that the detail message associated with
043     * {@code cause} is <i>not</i> automatically incorporated in
044     * this runtime exception's detail message.
045     *
046     * @param message the detail message (which is saved for later retrieval
047     *                by the {@link #getMessage()} method).
048     * @param cause   the cause (which is saved for later retrieval by the
049     *                {@link #getCause()} method).  (A <tt>null</tt> value is
050     *                permitted, and indicates that the cause is nonexistent or
051     *                unknown.)
052     * @since 1.4
053     */
054    public RerankException(String message, Throwable cause) {
055        super(message, cause);
056    }
057
058    /**
059     * Constructs a new runtime exception with the specified cause and a
060     * detail message of <tt>(cause==null ? null : cause.toString())</tt>
061     * (which typically contains the class and detail message of
062     * <tt>cause</tt>).  This constructor is useful for runtime exceptions
063     * that are little more than wrappers for other throwables.
064     *
065     * @param cause the cause (which is saved for later retrieval by the
066     *              {@link #getCause()} method).  (A <tt>null</tt> value is
067     *              permitted, and indicates that the cause is nonexistent or
068     *              unknown.)
069     * @since 1.4
070     */
071    public RerankException(Throwable cause) {
072        super(cause);
073    }
074
075    /**
076     * Constructs a new runtime exception with the specified detail
077     * message, cause, suppression enabled or disabled, and writable
078     * stack trace enabled or disabled.
079     *
080     * @param message            the detail message.
081     * @param cause              the cause.  (A {@code null} value is permitted,
082     *                           and indicates that the cause is nonexistent or unknown.)
083     * @param enableSuppression  whether or not suppression is enabled
084     *                           or disabled
085     * @param writableStackTrace whether or not the stack trace should
086     *                           be writable
087     * @since 1.7
088     */
089    public RerankException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
090        super(message, cause, enableSuppression, writableStackTrace);
091    }
092}