Skip to content

Commit

Permalink
Fixed a missing exception handling.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@91 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Apr 13, 2008
1 parent c0fa333 commit d7bfc03
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/org/olap4j/driver/xmla/XmlaOlap4jCellSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ void populate() throws OlapException {
*
* @param cell The cell of which we want the casted object.
* @return The object with a correct value.
* @throws OlapException gets thrown if any error is encountered while casting the cell value.
*/
private Object getTypedValue(Element cell) {
private Object getTypedValue(Element cell) throws OlapException {
try {
Element elm = findChild(cell, MDDATASET_NS, "Value");

Expand All @@ -332,11 +333,7 @@ private Object getTypedValue(Element cell) {
return XmlaOlap4jUtil.stringElement(cell, "Value");
}
} catch (Exception e) {
// REVIEW: Use standard error-handling. Wrap the error in some
// contextual information and re-throw.
System.out.println(e.getMessage());
e.printStackTrace();
return null;
throw new OlapException("En exception was encountered while casting a cell value to it's correct data type.", e); //$NON-NLS-1$
}
}

Expand Down

0 comments on commit d7bfc03

Please sign in to comment.