Better exception handling for APIReflection calls.