Object obj = null; try { obj = super.sfResolve(r, index); }catch(Exception ex) { ex.printStackTrace(); throw (SmartFrogResolutionException) SmartFrogResolutionException.forward(ex); }
Object obj = super.sfResolve(r, index);
    public synchronized Object sfResolve(Reference r, int index) throws SmartFrogResolutionException {        Object obj = null;        try {            obj = super.sfResolve(r, index);        }catch(Exception ex) {            ex.printStackTrace();            throw (SmartFrogResolutionException) SmartFrogResolutionException.forward(ex);        }        if("HERE result".equals(r.elementAt(index).toString()) ) {            discoveredObject = null;            if(discoveryResults != null) {                while(discoveredObject == null && discoveryResults.hasMoreElements()) {                    ServiceURL theURL = (ServiceURL)discoveryResults.nextElement();                    try {                        discoveredObject = theURL.getURLPathObject();                    }catch(Exception ex) {                        discoveredObject = null;                    }                }            }            if(discoveredObject == null) {                throw new SmartFrogResolutionException("SLP: The requested service was not found");            }            // return the discovered component            return discoveredObject;        }        return obj;    }