Moving to use exceptions instead of errors