Skip to content

Commit

Permalink
Improve exception logic
Browse files Browse the repository at this point in the history
  • Loading branch information
HindujaB committed Nov 19, 2024
1 parent aa40a35 commit 0880179
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class ModuleUtils {

private static Module module;

private ModuleUtils() {}
private ModuleUtils() {
}

public static void setModule(Environment environment) {
module = environment.getCurrentModule();
Expand All @@ -46,6 +47,11 @@ public static Module getModule() {
public static Object getResult(CompletableFuture<Object> balFuture) {
try {
return balFuture.get();
} catch (BError error) {
throw error;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw ErrorCreator.createError(e);
} catch (Throwable throwable) {
throw ErrorCreator.createError(throwable);
}
Expand Down

0 comments on commit 0880179

Please sign in to comment.