The bottom line is that you have to change the code to have the function do something else. Since this is as true for Vlad as any other poster, I really don't see the point of criticizing an algorithm simply because changing it requires changing a specific portion of the code.
The real draw of Vlad's code is that the same error condition can be used for any such function.