Support for two additional error types; refactor parameter parsing