public abstract class BlockException extends Exception
| Modifier and Type | Field and Description |
|---|---|
static String |
BLOCK_EXCEPTION_FLAG |
static String |
BLOCK_EXCEPTION_MSG_PREFIX |
protected AbstractRule |
rule |
static StackTraceElement[] |
sentinelStackTrace |
static RuntimeException |
THROW_OUT_EXCEPTION
this constant RuntimeException has no stack trace, just has a message
BLOCK_EXCEPTION_FLAG that marks its name. |
| Constructor and Description |
|---|
BlockException(String ruleLimitApp) |
BlockException(String ruleLimitApp,
AbstractRule rule) |
BlockException(String ruleLimitApp,
String message) |
BlockException(String ruleLimitApp,
String message,
AbstractRule rule) |
BlockException(String message,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
fillInStackTrace() |
AbstractRule |
getRule() |
String |
getRuleLimitApp() |
static boolean |
isBlockException(Throwable t)
Check whether the exception is sentinel blocked exception.
|
void |
setRuleLimitApp(String ruleLimitApp) |
RuntimeException |
toRuntimeException() |
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final String BLOCK_EXCEPTION_FLAG
public static final String BLOCK_EXCEPTION_MSG_PREFIX
public static RuntimeException THROW_OUT_EXCEPTION
this constant RuntimeException has no stack trace, just has a message
BLOCK_EXCEPTION_FLAG that marks its name.
Use isBlockException(Throwable) to check whether one Exception
Sentinel Blocked Exception.
public static StackTraceElement[] sentinelStackTrace
protected AbstractRule rule
public BlockException(String ruleLimitApp)
public BlockException(String ruleLimitApp, AbstractRule rule)
public BlockException(String ruleLimitApp, String message, AbstractRule rule)
public Throwable fillInStackTrace()
fillInStackTrace in class Throwablepublic String getRuleLimitApp()
public void setRuleLimitApp(String ruleLimitApp)
public RuntimeException toRuntimeException()
public static boolean isBlockException(Throwable t)
BlockException, orBLOCK_EXCEPTION_FLAGt - the exception.public AbstractRule getRule()
Copyright © 2021 Alibaba Group. All rights reserved.