Closed andrewbaxter439 closed 12 months ago
Hi @pbronka - had started this draft PR but wanted to hold off on submitting it until #37 is resolved as I've included multiple of the same commits and need to tidy this up. If the headless setup and github runs branch seems to be working and mergeable I can work on this one this week? It's a minor thing but would want to suggest it as a failsafe.
to note - only the last two commits here belong to this branch specifically, but I built this on top of experimental/headless_setup and need to test it/tidy it up if the other one gets merged! Thanks.
These try/catch statements should work to exit the run when it fails. Had tested out by adding a throw new RuntimeException("Test error")
to the KeyFunction
constructor and seems to catch reliably in all cases. Hope it's helpful @pbronka!
Minor additional tweak - the checks throwing
RuntimeException
s inKeyFunction
were not being caught and leaving run in suspense. https://github.com/centreformicrosimulation/SimPaths/blob/2909099624042b85b1723d044ada3328bc6cc00b/src/main/java/simpaths/model/taxes/KeyFunction.java#L44-L47The proposed changes add try/catch statements and exit the run if these errors are thrown.