Replaced ArgumentException by ParsingException where appropriate