Yes, new error codes might be introduced and you might forget to
update this (or other) checks.
Checking for errors really MUST always be done by checking for
ret != success (typically ret != 0 or ret < 0).
Only checking for known error codes means that if somehow an
unknown error code gets thrown this gets treated as success,
which is not acceptable behavior.