Let's throw something more specific (maybe make our own RuntimeException) that we can catch.  Or, maybe re-throw a RecognitionException from a catch block in the call to factory.function above.