The former claim a compile-time warning, but sets the 'error' on failure, the later doesn't claim a compile-time warning, but does not set the 'error' on failure. Using the return value of both functions fixes two things at once.