provide slightly better error message when processing patterns - #5