Open AndrewD opened 3 months ago
In fact for all vendor's drivers program
method throw exceptions when something is wrong.
But it's true, changing program
to a non void method may be more easy to manage
And for efinix most of errors doesn't produces exception.
If throwing an exception is the existing pattern then following this for Efinix would be sufficient for now - openfpgaloader just returning a non-zero value on error is all we need.
with this commit all errors are correctly handled by program() method. It's good to you?
Efinix: programming errors still result in a success return code so there is no way for a script to detect errors from the return value.
This interface needs to be able to propagate errors (not return void): https://github.com/trabucayre/openFPGALoader/blob/a39524636bcc0846a799ed1fb874c891fc350c1b/src/efinix.hpp#L30