ValueError gives mis-leading error message if catching a non-related ValueError
LinuxIsCool opened this issue · 3 comments
LinuxIsCool commented
cadCAD/cadCAD/engine/execution.py
Line 147 in 7feecf8
My policy function was raising ValueError due to a mis-use of a numpy function which was raising a ValueError. The "'sim_configs' N must > 0" message was thus very confusing.
Suggestion: cadCAD should define it's own exceptions and raise them explicitly before having a final generic exception for cases like this. Cheers 🌵
JEJodesty commented
@LinuxIsCool
Thanks :)
Will move sim_configs
exception including this ValueError
execution to the correct place
JEJodesty commented
Updated Build with solution in staging
branch
https://github.com/cadCAD-org/cadCAD/tree/staging
JEJodesty commented
Resolved by ver 0.4.27