Give a better error message when failing pattern matching.