Support specification of keys to be added to input tuple on match.
Handle exception correctly.