error handling for reading multipart statements