use exceptions instead of introspection