Skip to content

Commit

Permalink
Merge catch
Browse files Browse the repository at this point in the history
  • Loading branch information
seime committed Jan 6, 2025
1 parent 9922f43 commit fb48112
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,7 @@ private void createRuleInstances() {
cls.getDeclaredConstructor().newInstance();
logger.info("Instantiated JRuleItems class");
} catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException
| InvocationTargetException e) {
logger.error("Could not instantiate JRuleItems file", e);
} catch (Error e) {
| InvocationTargetException | Error e) {
logger.error("Could not instantiate JRuleItems file", e);
}

Expand All @@ -293,23 +291,19 @@ private void createRuleInstances() {
Class<?> cls = Class.forName(config.getGeneratedThingPackage() + ".JRuleThings", true, loader);
cls.getDeclaredConstructor().newInstance();
logger.info("Instantiated JRuleThings class");
} catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException
| InvocationTargetException e) {
} catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException |
InvocationTargetException | Error e) {
logger.error("Could not instantiate JRuleThings file", e);
} catch (Error error) {
logger.error("Could not instantiate JRuleThings file", error);
}

// Reload Actions class - this will also instantiate all actions
try {
Class<?> cls = Class.forName(config.getGeneratedActionPackage() + ".JRuleActions", true, loader);
cls.getDeclaredConstructor().newInstance();
logger.info("Instantiated JRuleActions class");
} catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException
| InvocationTargetException e) {
} catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException |
InvocationTargetException | Error e) {
logger.error("Could not instantiate JRuleActions file", e);
} catch (Error error) {
logger.error("Could not instantiate JRuleActions file", error);
}

// Load rules that refer to the items
Expand Down

0 comments on commit fb48112

Please sign in to comment.