001/*
002 * Copyright 2023 Web-Legacy
003 *
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 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
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 org.apache.tiles.request.jakarta.servlet;
017
018/**
019 * Exception that indicates that a resource could not be used because it is not
020 * in a servlet environment.
021 *
022 * <p>Copied from Apache tiles-request-servlet 1.0.7 and adapted for
023 * Jakarta EE 9.</p>
024 */
025public class NotAServletEnvironmentException extends RuntimeException {
026    private static final long serialVersionUID = 6842625298829813103L;
027
028    /**
029     * Constructor.
030     */
031    public NotAServletEnvironmentException() {
032    }
033
034    /**
035     * Constructor.
036     *
037     * @param message The detail message.
038     */
039    public NotAServletEnvironmentException(String message) {
040        super(message);
041    }
042
043    /**
044     * Constructor.
045     *
046     * @param e The exception to be wrapped.
047     */
048    public NotAServletEnvironmentException(Throwable e) {
049        super(e);
050    }
051
052    /**
053     * Constructor.
054     *
055     * @param message The detail message.
056     * @param e The exception to be wrapped.
057     */
058    public NotAServletEnvironmentException(String message, Throwable e) {
059        super(message, e);
060    }
061}