toException

JVM-only extension on ValidationResult for projecting an Invalid result onto the TrustWeave exception hierarchy. Lives here (not in the multiplatform ValidationResult class itself) because TrustWeaveException is still JVM-only.

Return

null if valid, TrustWeaveException.ValidationFailed if invalid