clinical-reasoning icon indicating copy to clipboard operation
clinical-reasoning copied to clipboard

Exception propagates out of `R4MeasureService.ensureSupplementalDataElementSearchParameter`

Open smailliwcs opened this issue 2 months ago • 0 comments

R4MeasureService.ensureSupplementalDataElementSearchParameter is written to swallow NotImplementedOperationException:

https://github.com/cqframework/clinical-reasoning/blob/b6377c2c2f37034ddf5745f32b362f34e502d674/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/measure/r4/R4MeasureService.java#L120-L124

But in at least one case (InMemoryFhirRepository), the exception thrown by the repository is a NotImplementedException:

https://github.com/cqframework/clinical-reasoning/blob/b6377c2c2f37034ddf5745f32b362f34e502d674/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/InMemoryFhirRepository.java#L198

Should the thrown/caught exception types be compatible here? Prior to #435, R4MeasureService caught UnsupportedOperationException, which did swallow the (subclassing) NotImplementedException.

smailliwcs avatar Apr 16 '24 20:04 smailliwcs