We're updating the issue view to help you get more done. 

Improve error messages

Description

Here's one example of library error messages to improve, there may be others.
(The cause of hitting the error was corrupt files on disk. Filing this ticket to capture the improvement.)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Index: org/unicode/cldr/util/SupplementalDataInfo.java =================================================================== --- org/unicode/cldr/util/SupplementalDataInfo.java (revision 11501) +++ org/unicode/cldr/util/SupplementalDataInfo.java (working copy) @@ -1300,7 +1300,7 @@ } // System.out.println("Skipped Element: " + path); } catch (Exception e) { - throw (IllegalArgumentException) new IllegalArgumentException("path: " + throw (IllegalArgumentException) new IllegalArgumentException("Exception while processing path: " + path + ",\tvalue: " + value).initCause(e); } } @@ -2868,7 +2868,9 @@ lastDayPeriodType = type; // System.out.println(type + ", " + locales + ", " + path); } - DayPeriod dayPeriod = DayPeriod.fromString(path.getAttributeValue(-1, "type")); + final String typeValue = path.getAttributeValue(-1, "type"); + if(typeValue == null) throw new IllegalArgumentException("Missing required attribute: 'type' in " + path); + DayPeriod dayPeriod = DayPeriod.fromString(typeValue); String at = path.getAttributeValue(-1, "at"); String from = path.getAttributeValue(-1, "from"); String after = path.getAttributeValue(-1, "after");

Environment

xpath

None

locale

None

Status

Assignee

Steven R. Loomis

Reporter

Steven R. Loomis

tracReporter

srl

tracOwner

srl

tracResolution

fixed

tracStatus

closed

Reviewer

Peter Edberg

phase

dsub

tracCreated

Apr 23, 2015, 10:03 PM

Components

Fix versions

Priority

medium