KatachiKonsistDirectAssertionException

Konsist's own assertion ran inside a konsist { } block.

KonsistScope shadows all twelve of them as compile errors, so reaching this means the shadow was suppressed, or Konsist threw from somewhere katachi does not shadow. Either way the run has no idea which declarations were rejected — Konsist reports them in prose, and a report block here opens with a real path — so the constraint is reported as unanswered rather than as a failure it cannot describe.

Example 1: catch a suppressed assertTrue

val failure = shouldThrow<KatachiArchitectureAssertionError> {
projectArchitecture.assert(FileConstraintCheck())
}
failure.violations.filterIsInstance<UncheckedFileConstraint>()
.single().cause.shouldBeInstanceOf<KatachiKonsistDirectAssertionException>()

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?
Link copied to clipboard

The assertion that ran, or the Konsist exception type when the call is not one katachi shadows.