Skip to content

Commit

Permalink
refact: quiet logging for runtimeexceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Oct 27, 2024
1 parent 06386f5 commit 75dd013
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/main/java/neqsim/thermo/system/SystemThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -915,11 +915,18 @@ public void addTBPfraction(String componentName, double numberOfMoles, double mo
// //refSystem.initPhysicalProperties();
// // APIdens - refSystem.getPhase(1).getPhysicalProperties().getDensity();
// sammenligne med API-standard for tetthet - og sette Penloux dt
} catch (RuntimeException ex) {
// todo: Should not swallow notimplementedexception
/*
* if (ex.getCause().getClass().equals(NotImplementedException.class)) { throw ex; }
*/
logger.error(ex.getMessage());
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}

double critVol = characterization.getTBPModel().calcCriticalVolume(molarMass * 1000, density);

// 0.2918-0.0928*acs)*ThermodynamicConstantsInterface.R*TC/PC*10.0;
addComponent(componentName, numberOfMoles, TC, PC, acs);
double Kwatson = Math.pow(TB * 1.8, 1.0 / 3.0) / density;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ public static void setComposition(SystemInterface fluid, String inputFile) {
fluid.addComponent(name + pseudoName, ZI.get(counter));
}
}
} catch (RuntimeException ex) {
logger.error(ex.getMessage());
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
logger.error(ex.getMessage());
}
}

Expand Down

0 comments on commit 75dd013

Please sign in to comment.