add basic exception handling to classes