A dict of error message strings, and a single ``if ierr > 0: raise ValueError(_errmsg[ierr])`` would be cleaner. That's how it's done in a number of other