Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Additional error handling in config index processor
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Aug 28, 2024
1 parent ba1e279 commit 5bdb08c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.runtime.RuntimeValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class ConfigIndexProcessor {

private static final Logger log = LoggerFactory.getLogger(ConfigIndexProcessor.class);

@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
void syntheticBean(DynamicPropertiesInfoRecorder recorder, BeanDiscoveryFinishedBuildItem beanDiscovery, BuildProducer<SyntheticBeanBuildItem> syntheticBeans) {
Expand Down Expand Up @@ -78,6 +82,9 @@ void syntheticBean(DynamicPropertiesInfoRecorder recorder, BeanDiscoveryFinished

return def;
} catch (Exception e) {
if (e.getMessage().contains("Not a parameterized type")) {
log.error("Invalid type for @Dynamic config property (must be Supplier<Type>)");
}
throw new RuntimeException(e);
}
})
Expand Down

0 comments on commit 5bdb08c

Please sign in to comment.