Implement exception match cases in ppx extension.