From 9e33c139c035cd245a06ff41e2bc9502a810c6e1 Mon Sep 17 00:00:00 2001
From: gpawel <gpawel>
Date: Tue, 30 Aug 2011 13:10:53 +0000
Subject: [PATCH] LMS-2462 fixed dependencies

SVN: 22715
---
 .../cisd/common/parser/ExcelRowTokenizer.java      | 14 ++++++++------
 .../cisd/common/parser/ILineTokenizer.java         |  2 +-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/common/source/java/ch/systemsx/cisd/common/parser/ExcelRowTokenizer.java b/common/source/java/ch/systemsx/cisd/common/parser/ExcelRowTokenizer.java
index 5be83b61689..5f7450f1470 100644
--- a/common/source/java/ch/systemsx/cisd/common/parser/ExcelRowTokenizer.java
+++ b/common/source/java/ch/systemsx/cisd/common/parser/ExcelRowTokenizer.java
@@ -31,7 +31,7 @@ public class ExcelRowTokenizer implements ILineTokenizer<Row>
     {
     }
 
-    public String[] tokenize(Row row)
+    public String[] tokenize(Row row) throws ParsingException
     {
         return tokenizeRow(row);
     }
@@ -48,7 +48,7 @@ public class ExcelRowTokenizer implements ILineTokenizer<Row>
         return line;
     }
 
-    private static String extractCellValue(Cell cell)
+    private static String extractCellValue(Cell cell) throws ParsingException
     {
         switch (cell.getCellType())
         {
@@ -65,11 +65,13 @@ public class ExcelRowTokenizer implements ILineTokenizer<Row>
                         "Excel formulas are not supported but one was found in cell "
                                 + extractCellPosition(cell));
             case Cell.CELL_TYPE_ERROR:
-                throw new UserFailureException("There is an error in cell "
-                        + extractCellPosition(cell));
+                throw new ParsingException(new String[]
+                    { "There is an error in cell " + extractCellPosition(cell) },
+                        cell.getRowIndex());
             default:
-                throw new UserFailureException("Unknown data type of cell "
-                        + extractCellPosition(cell));
+                throw new ParsingException(new String[]
+                    { "Unknown data type of cell " + extractCellPosition(cell) },
+                        cell.getRowIndex());
         }
     }
 
diff --git a/common/source/java/ch/systemsx/cisd/common/parser/ILineTokenizer.java b/common/source/java/ch/systemsx/cisd/common/parser/ILineTokenizer.java
index 91b7f82d504..5999199923f 100644
--- a/common/source/java/ch/systemsx/cisd/common/parser/ILineTokenizer.java
+++ b/common/source/java/ch/systemsx/cisd/common/parser/ILineTokenizer.java
@@ -34,7 +34,7 @@ public interface ILineTokenizer<T>
     public void init();
 
     /** Splits given <code>line</code> into an array of tokens. */
-    public String[] tokenize(T line);
+    public String[] tokenize(T line) throws ParsingException;
 
     /**
      * Cleans up resources used by this <code>ILineTokenizer</code>.
-- 
GitLab