[Swift-commit] r3487 - trunk/src/org/griphyn/vdl/mapping/file

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Jul 28 14:41:50 CDT 2010


Author: hategan
Date: 2010-07-28 14:41:50 -0500 (Wed, 28 Jul 2010)
New Revision: 3487

Modified:
   trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java
Log:
more friendly exception

Modified: trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java	2010-07-28 19:41:08 UTC (rev 3486)
+++ trunk/src/org/griphyn/vdl/mapping/file/CSVMapper.java	2010-07-28 19:41:50 UTC (rev 3487)
@@ -81,6 +81,9 @@
 
 			if (header) {
 				line = br.readLine();
+				if (line == null) {
+				    throw new RuntimeException("Invalid CSV file (" + file + "): missing header.");
+				}
 				st = new StringTokenizer(line, hdelim);
 				int ix = 0;
 				while (st.hasMoreTokens()) {




More information about the Swift-commit mailing list