I am aware that it will not be possible to change this due to compatibility issues but would it be possible for the function to have a return value instead of raising an error? I can think of doing this using arguments or perhaps other function. Just a suggestion.