Skip to content

Commit

Permalink
Catch error if resultlables and/or resultvalues in CDK are null.
Browse files Browse the repository at this point in the history
  • Loading branch information
olas committed Mar 12, 2010
1 parent aa79b83 commit ad6368b
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -382,8 +382,13 @@ else if (obj instanceof String) {
}

//Check that we got back correct number of values
if (resultLabels.length != resultVals.length) {
logger.warn("#labels != #vals for " + descType.getOntologyid());
if (resultLabels==null || resultVals==null){
logger.error("No resultValues or labels for CDK descriptor: " + descType.getOntologyid() + " for mol: " + cdkmol.getName());
res.setErrorMessage( "No resultValues or labels");
}
else if (resultLabels.length != resultVals.length) {
logger.error("#labels != #vals for " + descType.getOntologyid());
res.setErrorMessage( "#labels != #vals for " + descType.getOntologyid() );
}

res.setLabels(resultLabels);
Expand Down

0 comments on commit ad6368b

Please sign in to comment.