cadCAD-org/cadCAD

ValueError gives mis-leading error message if catching a non-related ValueError

LinuxIsCool opened this issue · 3 comments

raise ValueError("\'sim_configs\' N must > 0")

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 🌵

@LinuxIsCool
Thanks :)
Will move sim_configs exception including this ValueError execution to the correct place

Updated Build with solution in staging branch
https://github.com/cadCAD-org/cadCAD/tree/staging

Resolved by ver 0.4.27