Eliminate C-style return value checking in favor of exceptions