Bug 476999 - Log format conversion errors from XML
Summary: Log format conversion errors from XML
Status: NEW
Alias: None
Product: MPC
Classification: Technology
Component: Install (show other bugs)
Version: 1.4.0   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-09 14:35 EDT by Carsten Reckord CLA
Modified: 2015-09-09 14:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Reckord CLA 2015-09-09 14:35:55 EDT
Currently we swallow any errors when converting from XML strings to numbers, dates, etc and just return null. See methods in UnmarshalContentHandler, e.g.


	protected Integer toInteger(String string) {
		if (string == null) {
			return null;
		}
		string = string.trim();
		if (string.length() == 0) {
			return null;
		}
		try {
			return Integer.parseInt(string);
		} catch (NumberFormatException e) {
			// fail soft
			return null;
		}
	}

We need to log these with proper context (parsed document url, node id, attribute ...) - ideally just once per Eclipse session and unique error