handleFailure
fun DiagnosticPass.handleFailure(pipeline: Pipeline, onWarn: (List<Throwable>) -> Unit = {}, onErr: (List<Throwable>) -> Unit = {})
Verifies whether the pipeline passes this diagnostic as if by calling invoke, and invokes onWarn or onErr depending on whether this diagnostic is a DiagnosticPass.Warning or DiagnosticPass.Error respectively.
This method can be used as a shorthand when running a set of DiagnosticPass in a loop without needing to dispatch based on the severity of each diagnostic.