Skip to content

Commit

Permalink
Remove unnecessary try-catch
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Tse <[email protected]>
  • Loading branch information
ivan-tse committed Aug 7, 2024
1 parent 78c3d33 commit 3656651
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.opensearch.dataprepper.model.annotations.DataPrepperPluginConstructor;
import org.opensearch.dataprepper.model.configuration.PluginSetting;
import org.opensearch.dataprepper.model.event.Event;
import org.opensearch.dataprepper.model.plugin.InvalidPluginConfigurationException;
import org.opensearch.dataprepper.model.plugin.PluginFactory;
import org.opensearch.dataprepper.model.record.Record;
import org.opensearch.dataprepper.model.sink.AbstractSink;
Expand Down Expand Up @@ -68,17 +67,7 @@ public boolean isReady() {

@Override
public void doInitialize() {
try {
sinkInitialized = true;
} catch (InvalidPluginConfigurationException e) {
LOG.error("The personalize sink has an invalid configuration and cannot initialize.");
this.shutdown();
throw e;
} catch (Exception e) {
LOG.error("Failed to initialize personalize sink.");
this.shutdown();
throw e;
}
sinkInitialized = true;
}

/**
Expand Down

0 comments on commit 3656651

Please sign in to comment.