change default behavior to return errors, added option to throw instead
updated (and added) test cases to handle returned vs. thrown errors
updated README to show return-style errors instead of throw