trap the parse panic and return as error