public class CodeException extends RuntimeException implements I18nAware, CodeAware
| Modifier and Type | Class and Description |
|---|---|
static class |
CodeException.TweakingCodeException
tweaking stacktrace by code and thread
|
I18nAware.I18nSource| Modifier and Type | Field and Description |
|---|---|
static boolean |
DefaultStack |
static CodeException.TweakingCodeException |
TweakStack |
| Constructor and Description |
|---|
CodeException(boolean stack,
@NotNull CodeEnum code)
Constructs a stacked or unstacked exception depending on the Global or Thread setting.
|
CodeException(boolean stack,
@NotNull CodeEnum code,
Object... args)
Constructs a stacked or unstacked exception directly.
|
CodeException(boolean stack,
@NotNull String code)
Constructs a stacked or unstacked exception directly.
|
CodeException(boolean stack,
@NotNull String code,
String message)
Constructs a stacked or unstacked exception depending on the Global or Thread setting.
|
CodeException(boolean stack,
@NotNull String code,
String message,
Object... args)
Constructs a stacked or unstacked exception directly.
|
CodeException(@NotNull CodeEnum code)
Constructs a stacked or unstacked exception depending on the Global or Thread setting.
|
CodeException(@NotNull CodeEnum code,
Object... args)
Constructs a stacked or unstacked exception depending on the Global or Thread setting.
|
CodeException(@NotNull String code)
Constructs a stacked or unstacked exception depending on the Global or Thread setting.
|
CodeException(@NotNull String code,
String message)
Constructs a stacked or unstacked exception depending on the Global or Thread setting.
|
CodeException(@NotNull String code,
String message,
Object... args)
Constructs a stacked or unstacked exception directly.
|
CodeException(@NotNull Throwable cause,
@NotNull CodeEnum code) |
CodeException(@NotNull Throwable cause,
@NotNull CodeEnum code,
Object... args) |
CodeException(@NotNull Throwable cause,
@NotNull String code) |
CodeException(@NotNull Throwable cause,
@NotNull String code,
String message) |
CodeException(@NotNull Throwable cause,
@NotNull String code,
String message,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyLocale(Locale locale,
@NotNull I18nAware.I18nSource source)
apply the internal locale and updates the i18n state based on the provided source.
|
@NotNull String |
getCode() |
Object[] |
getI18nArgs()
the args of template
|
String |
getI18nCode()
the i18n code, also template id
|
String |
getI18nHint()
the default message or template (if no template by code)
|
String |
getLocalizedMessage() |
String |
getMessage() |
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetI18nArgsIf, getI18nArgsOr, getI18nCodeIf, getI18nCodeOr, getI18nHintIf, getI18nHintOr, toI18nString, toI18nString, toI18nString, toString, toString, toStringpublic static final boolean DefaultStack
public static final CodeException.TweakingCodeException TweakStack
public CodeException(boolean stack,
@NotNull
@NotNull String code,
String message,
Object... args)
public CodeException(@NotNull
@NotNull String code)
public CodeException(boolean stack,
@NotNull
@NotNull String code)
public CodeException(@NotNull
@NotNull String code,
String message)
public CodeException(boolean stack,
@NotNull
@NotNull String code,
String message)
public CodeException(@NotNull
@NotNull String code,
String message,
Object... args)
public CodeException(@NotNull
@NotNull CodeEnum code)
public CodeException(boolean stack,
@NotNull
@NotNull CodeEnum code)
public CodeException(@NotNull
@NotNull CodeEnum code,
Object... args)
public CodeException(boolean stack,
@NotNull
@NotNull CodeEnum code,
Object... args)
public CodeException(@NotNull
@NotNull Throwable cause,
@NotNull
@NotNull String code,
String message,
Object... args)
public CodeException(@NotNull
@NotNull Throwable cause,
@NotNull
@NotNull String code)
public CodeException(@NotNull
@NotNull Throwable cause,
@NotNull
@NotNull String code,
String message)
public CodeException(@NotNull
@NotNull Throwable cause,
@NotNull
@NotNull CodeEnum code)
public String getMessage()
getMessage in class Throwablepublic String getLocalizedMessage()
getLocalizedMessage in class Throwablepublic void applyLocale(Locale locale, @NotNull @NotNull I18nAware.I18nSource source)
I18nAwareapplyLocale in interface I18nAwarelocale - the locale to be appliedsource - the i18n source providing the translationspublic String getI18nHint()
I18nAwaregetI18nHint in interface I18nAwarepublic String getI18nCode()
I18nAwaregetI18nCode in interface I18nAwarepublic Object[] getI18nArgs()
I18nAwaregetI18nArgs in interface I18nAwareCopyright © 2025. All rights reserved.