error.ml to handle errors with locations + Or pattern