Package io.deephaven.base.verify
Class RequirementFailure
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.deephaven.base.verify.RequirementFailure
- All Implemented Interfaces:
Serializable
RuntimeException to be thrown on requirement failures.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequirementFailure(String message, int nCallsBelowRequirer) RequirementFailure(String message, Exception caughtException, int nCallsBelowRequirer) -
Method Summary
Modifier and TypeMethodDescriptionIf this stack frame caused the exception, adjust the culprit to be the caller.If this stack frame caused the exception, adjust the culprit to be the caller.intGets the number of stack frames that should be removed from the stack to find the caller which failed to meet requirements.Gets the unmodified stack trace, instead of the one with the culprit identified.booleanisThisStackFrameCulprit(int nFramesBelowTargetFrame) Returns true if this stack frame is blamed for causing the exception.voidvoidvoidMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
RequirementFailure
-
RequirementFailure
-
-
Method Details
-
getNumCallsBelowRequirer
public int getNumCallsBelowRequirer()Gets the number of stack frames that should be removed from the stack to find the caller which failed to meet requirements. -
printStackTrace
public void printStackTrace()- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
getOriginalStackTrace
Gets the unmodified stack trace, instead of the one with the culprit identified. -
adjustForDelegatingMethod
If this stack frame caused the exception, adjust the culprit to be the caller. Used when a delegating method can't verify all requirements itself but shouldn't receive the blame. -
adjustForDelegatingMethodAndSyntheticAccessor
If this stack frame caused the exception, adjust the culprit to be the caller. Used when a delegating method can't verify all requirements itself but shouldn't receive the blame. -
isThisStackFrameCulprit
public boolean isThisStackFrameCulprit(int nFramesBelowTargetFrame) Returns true if this stack frame is blamed for causing the exception.
-