001/** 002 * Copyright (c) 2025-2026, Michael Yang 杨福海 (fuhai999@gmail.com). 003 * <p> 004 * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.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.gnu.org/licenses/lgpl-3.0.txt 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 dev.tinyflow.core.util; 017 018public class JsCodeException extends RuntimeException { 019 /** 020 * Constructs a new runtime exception with {@code null} as its 021 * detail message. The cause is not initialized, and may subsequently be 022 * initialized by a call to {@link #initCause}. 023 */ 024 public JsCodeException() { 025 } 026 027 /** 028 * Constructs a new runtime exception with the specified detail message. 029 * The cause is not initialized, and may subsequently be initialized by a 030 * call to {@link #initCause}. 031 * 032 * @param message the detail message. The detail message is saved for 033 * later retrieval by the {@link #getMessage()} method. 034 */ 035 public JsCodeException(String message) { 036 super(message); 037 } 038 039 /** 040 * Constructs a new runtime exception with the specified detail message and 041 * cause. <p>Note that the detail message associated with 042 * {@code cause} is <i>not</i> automatically incorporated in 043 * this runtime exception's detail message. 044 * 045 * @param message the detail message (which is saved for later retrieval 046 * by the {@link #getMessage()} method). 047 * @param cause the cause (which is saved for later retrieval by the 048 * {@link #getCause()} method). (A <tt>null</tt> value is 049 * permitted, and indicates that the cause is nonexistent or 050 * unknown.) 051 * @since 1.4 052 */ 053 public JsCodeException(String message, Throwable cause) { 054 super(message, cause); 055 } 056 057 /** 058 * Constructs a new runtime exception with the specified cause and a 059 * detail message of <tt>(cause==null ? null : cause.toString())</tt> 060 * (which typically contains the class and detail message of 061 * <tt>cause</tt>). This constructor is useful for runtime exceptions 062 * that are little more than wrappers for other throwables. 063 * 064 * @param cause the cause (which is saved for later retrieval by the 065 * {@link #getCause()} method). (A <tt>null</tt> value is 066 * permitted, and indicates that the cause is nonexistent or 067 * unknown.) 068 * @since 1.4 069 */ 070 public JsCodeException(Throwable cause) { 071 super(cause); 072 } 073 074 /** 075 * Constructs a new runtime exception with the specified detail 076 * message, cause, suppression enabled or disabled, and writable 077 * stack trace enabled or disabled. 078 * 079 * @param message the detail message. 080 * @param cause the cause. (A {@code null} value is permitted, 081 * and indicates that the cause is nonexistent or unknown.) 082 * @param enableSuppression whether or not suppression is enabled 083 * or disabled 084 * @param writableStackTrace whether or not the stack trace should 085 * be writable 086 * @since 1.7 087 */ 088 public JsCodeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 089 super(message, cause, enableSuppression, writableStackTrace); 090 } 091}