From: <raj...@us...> - 2007-04-08 22:23:06
|
Revision: 8173 http://svn.sourceforge.net/cdk/?rev=8173&view=rev Author: rajarshi Date: 2007-04-08 15:23:03 -0700 (Sun, 08 Apr 2007) Log Message: ----------- Made errors a little more legible. Cleaned up code Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/smiles/smarts/SMARTSQueryTool.java Modified: trunk/cdk/src/org/openscience/cdk/smiles/smarts/SMARTSQueryTool.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/smiles/smarts/SMARTSQueryTool.java 2007-04-08 22:19:09 UTC (rev 8172) +++ trunk/cdk/src/org/openscience/cdk/smiles/smarts/SMARTSQueryTool.java 2007-04-08 22:23:03 UTC (rev 8173) @@ -11,6 +11,7 @@ import org.openscience.cdk.isomorphism.matchers.QueryAtomContainer; import org.openscience.cdk.isomorphism.mcss.RMap; import org.openscience.cdk.ringsearch.AllRingsFinder; +import org.openscience.cdk.tools.LoggingTool; import java.util.ArrayList; import java.util.Iterator; @@ -43,6 +44,7 @@ * @cdk.keyword substructure search */ public class SMARTSQueryTool { + private LoggingTool logger; private String smarts; private IAtomContainer atomContainer = null; @@ -51,6 +53,7 @@ private List matchingAtoms = null; public SMARTSQueryTool(String smarts) throws CDKException { + logger = new LoggingTool(this); this.smarts = smarts; initializeQuery(); } @@ -137,7 +140,13 @@ private void initializeMolecule() throws CDKException { // do all ring perception AllRingsFinder arf = new AllRingsFinder(); - IRingSet ringSet = arf.findAllRings(atomContainer); + IRingSet ringSet = null; + try { + ringSet = arf.findAllRings(atomContainer); + } catch (CDKException e) { + logger.debug(e.toString()); + throw new CDKException(e.toString()); + } // next we want to add a property to each ring atom that // will be an array of Integers, indicating what size ring @@ -158,7 +167,12 @@ } // check for atomaticity - HueckelAromaticityDetector.detectAromaticity(atomContainer); + try { + HueckelAromaticityDetector.detectAromaticity(atomContainer); + } catch (CDKException e) { + logger.debug(e.toString()); + throw new CDKException(e.toString()); + } } private void initializeQuery() throws CDKException { @@ -195,11 +209,4 @@ } return atomMapping; } - - - public static void main(String[] args) throws CDKException { - - - } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |