handle error while parsing