exception handling on parsing class