From 7c76777f9157841f2791a07cd09f0b59b64a8750 Mon Sep 17 00:00:00 2001 From: Wikum Weerakutti Date: Fri, 22 Nov 2024 22:46:23 +0900 Subject: [PATCH] TRUNK-6287: Fix Exception Propagation Issue in ServiceContext.getRegisteredComponent Method (#4843) (#4848) (cherry picked from commit f0910d4443bdaf2180662af55d33f36e925efda5) --- api/src/main/java/org/openmrs/api/context/ServiceContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/api/context/ServiceContext.java b/api/src/main/java/org/openmrs/api/context/ServiceContext.java index b84f835ae9cb..dd3ed303ef61 100644 --- a/api/src/main/java/org/openmrs/api/context/ServiceContext.java +++ b/api/src/main/java/org/openmrs/api/context/ServiceContext.java @@ -906,7 +906,7 @@ public T getRegisteredComponent(String beanName, Class type) throws APIEx return applicationContext.getBean(beanName, type); } catch (BeansException beanException) { - throw new APIException("service.error.during.getting.component", null, beanException); + throw new APIException("Error during getting registered component", beanException); } }