User 6686efeff7
14-11-2008 13:32:30
Hi
I am not sure which forum to ask this question in. I am using chemaxon.jchem.db.UpdateHandler class to update a database using smiles strings. These smiles strings may some times be invalid, My problem is the way the API handles invalid smiles here are the specifics
1) UpdateHandler.execute() throws a SQLException without any description as to what was wrong with the smiles string. It would be very useful to be
able to find out what exactly was wrong with the smiles string preferably with a custom exception ( could be a subclass of SQLException, that way you can do it without breaking backward compatibility)
2) The UpdateHandler.execute_NE() and UpdateHandler.execute() methods prints a Exception stack trace internally which is not desirable, is there any way to stop this stack trace from being printed?
Here is the code that I am currently using to update the database
I am not sure which forum to ask this question in. I am using chemaxon.jchem.db.UpdateHandler class to update a database using smiles strings. These smiles strings may some times be invalid, My problem is the way the API handles invalid smiles here are the specifics
1) UpdateHandler.execute() throws a SQLException without any description as to what was wrong with the smiles string. It would be very useful to be
able to find out what exactly was wrong with the smiles string preferably with a custom exception ( could be a subclass of SQLException, that way you can do it without breaking backward compatibility)
2) The UpdateHandler.execute_NE() and UpdateHandler.execute() methods prints a Exception stack trace internally which is not desirable, is there any way to stop this stack trace from being printed?
Here is the code that I am currently using to update the database
Code: |
if ( (lines.length == 2) && SMILESRecognizer.canBeSMILES(lines[0]) ) { System.out.println("Adding smiles "+lines[0]); //set the smiles string handler.setStructure(lines[0]); //set the node id handler.setValueForAdditionalColumn(1, lines[1]); handler.execute_NE(); } |