Are there try catch statements in deluge?
How can I catch errors?
I'm using this script:
- void googlemap.getLatitudeAndLongitudeMap(providers provider)
- {
- /*address = provider.Full_Address;
- latandlngXml = getUrl("http://maps.google.com/maps/api/geocode/xml?address=" + address + "&sensor=true");
- // Retriving xml containing latitude and langitude xml
- if ((latandlngXml).length() > 0)
- {
- latitude = latandlngXml.executeXPath("/GeocodeResponse/result/geometry/location/lat/text()");
- longitude = latandlngXml.executeXPath("/GeocodeResponse/result/geometry/location/lng/text()");
- provider.Long_Lat = latitude + " " + longitude;
- }*/
- }
(uncommented)
It sometimes bugs out and throws an error when assigning latitude. When it throws an error I can't update the record. Is there anyway to catch an error from the executeXPath function?
e.g.
try{
}
catch(Exception e){
}