fixes #2: provide a tool method to handle errors when parsing options