Adds classes required for error handling on Tokenizer.
Modifies Tokenizer to add error handling.