Add error handling to match_from().