Class CrdbException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.cockroachlabs.crdb.anomaly.CrdbException
- All Implemented Interfaces:
Serializable
Unchecked, typed failure that wraps a
CrdbAnomaly. Callers get a
single exception type with an anomaly() accessor and can branch
exhaustively over the sealed hierarchy.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanomaly()The typed anomaly this exception carries.static Stringdescribe(CrdbAnomaly anomaly) Formats an anomaly for logging/telemetry using an exhaustive pattern-matchingswitchover the sealed hierarchy — the compiler guarantees every kind is handled.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CrdbException
-
-
Method Details
-
anomaly
The typed anomaly this exception carries. -
describe
Formats an anomaly for logging/telemetry using an exhaustive pattern-matchingswitchover the sealed hierarchy — the compiler guarantees every kind is handled.
-