aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/main/java/com/yahoo/jdisc/handler/OverloadException.java
blob: 5985a8e0db639421fedb4e2ed1010d408596437a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.handler;

/**
 * An exception to signal abort current action, as the container is overloaded.
 * Just unroll state as cheaply as possible.
 *
 * The contract of OverloadException is:
 *
 * <ol>
 *   <li>You must set the response yourself first, or you'll get an internal server error.
 *   <li>You must throw it from handleRequest synchronously.
 * </ol>
 *
 * @author Steinar Knutsen
 */
public class OverloadException extends RuntimeException {
    public OverloadException(String message, Throwable cause) {
        super(message, cause);
    }
}