minified-utils/com.dervarex.minified.utils.exceptions
StopException
@API(status = STABLE)
public class StopException
extends RuntimeExceptionA controlled abort/stop signal with structured details. Throw this when an operation must be terminated intentionally (user cancel, precondition failed, safety stop) rather than due to an unexpected bug.
- Superclasses
- RuntimeException → Exception → Throwable
- Implemented interfaces
- Serializable
Methods
StopException fatal(String)String getCode()Map<String, String> getMetadata()String getReason()Severity getSeverity()long getTimestampEpochMillis()Instant getTimestampInstant()boolean isRecoverable()StopException preconditionFailed(String)String toJson()String toUserFriendlyMessage()StopException userCancel(String)fatal(String)
staticSource
public static StopException fatal(String reason)| Parameters | ||
|---|---|---|
reason | String | |
| Returns | ||
StopException | ||
public String getCode()| Returns | ||
|---|---|---|
String | ||
public Map<String, String> getMetadata()public String getReason()| Returns | ||
|---|---|---|
String | ||
public Severity getSeverity()| Returns | ||
|---|---|---|
Severity | ||
public long getTimestampEpochMillis()| Returns | ||
|---|---|---|
long | ||
public Instant getTimestampInstant()| Returns | ||
|---|---|---|
Instant | ||
public boolean isRecoverable()| Returns | ||
|---|---|---|
boolean | ||
public static StopException preconditionFailed(String reason)| Parameters | ||
|---|---|---|
reason | String | |
| Returns | ||
StopException | ||
public String toJson()| Returns | ||
|---|---|---|
String | ||
public String toUserFriendlyMessage()| Returns | ||
|---|---|---|
String | ||
userCancel(String)
staticSource
public static StopException userCancel(String reason)| Parameters | ||
|---|---|---|
reason | String | |
| Returns | ||
StopException | ||
Nested types
Used by
Methods of other types that accept or return StopException.