Returning the error code and let the caller do the exit would promote re-usability