From 246dcda70776017388fdb338da863734a2c298f3 Mon Sep 17 00:00:00 2001 From: Brian Clements Date: Wed, 17 Sep 2014 10:30:08 -0500 Subject: [PATCH] Omaha #3015 improved exception handling for MPE lightning Change-Id: I3ab01d811bf49dbeced48d43744b93d470815636 Former-commit-id: 57f997f93e7e063ad6f24074ab3d1b8f02962bb8 --- .../uf/edex/ohd/pproc/MpeLightningSrv.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java index e925dad7db..feef5173c2 100644 --- a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java +++ b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeLightningSrv.java @@ -58,6 +58,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Mar 28, 2014 2952 mpduff Changed to use UFStatus for logging. * Jun 05, 2014 3226 bclement BinLightning refactor * Aug 20, 2014 3549 njensen Fixed spelling in exceptions + * Sep 17, 2014 3015 bclement improved exception handling * * * @@ -100,7 +101,7 @@ public class MpeLightningSrv { rs = (QueryResult) coreDao.executeNativeSql(lgtSQL, true); } catch (Exception e) { throw new EdexException("Couldn't get BinLightning records from" - + " metadata database. " + e); + + " metadata database. Failed SQL: " + lgtSQL, e); } return rs.getRows(); } @@ -184,13 +185,16 @@ public class MpeLightningSrv { } catch (StorageException se) { throw new EdexException( - "Could not retrieve datasets from datastore : " + se); + "Could not retrieve datasets from datastore for dataURI: " + + dataURI, se); } catch (HibernateException he) { throw new EdexException( - "Could not insert into ifhs lightning table : " + he); + "Could not insert into ifhs lightning table for dataURI: " + + dataURI, he); } catch (Exception e) { - throw new EdexException("Could not convert to grid coordinate : " - + e); + throw new EdexException( + "Could not convert to grid coordinate for dataURI: " + + dataURI, e); } }