throw an error object
consistent style