Double-allocating resources does not raise an exception
auscompgeek opened this issue · 4 comments
auscompgeek commented
It did in previous seasons. This makes it a bit too easy to not notice until you check the console, since the messages from WPILibC seem to not show when the DS mini-console is set to error level.
virtuald commented
I tried customizing the trampolines, but realized after I was done that the trampolines are only used when python classes inherit the object. :(
virtuald commented
I think this is something we won't be able to successfully do until 2021, because it would require hooking errorbase in the underlying library.
virtuald commented
An alternative for teams that care (maybe we should do this in Magicbot?) is do the following at the end of robotInit:
errors = wpilib.ErrorBase.getGlobalErrors()
if errors:
# print them...
raise ValueError("OH NOSE")
virtuald commented
This is fixed in 2022.