Improved errors thrown by function `parse`