Issue #2044 Fix some error handling in GFE to eliminate exceptions in edex logs.

Change-Id: Iad8edf92318d6c9277648396ba450a3fc6eb5c5a

Former-commit-id: 1c520b8cd1 [formerly 89f07fe932 [formerly 3f9f254229066cfe12501aacd14e68937764fadb]]
Former-commit-id: 89f07fe932
Former-commit-id: 7cae1b981d
This commit is contained in:
Ron Anderson 2014-01-10 15:01:10 -06:00
parent dacdddf403
commit 41354cddf7
2 changed files with 9 additions and 5 deletions

View file

@ -1257,7 +1257,9 @@ public class GridParmManager {
d2dModelName, desiredVersions)) {
D2DGridDatabase db = D2DGridDatabase.getDatabase(config,
d2dModelName, refTime);
addDB(db);
if (db != null) {
addDB(db);
}
}
} catch (Exception e) {
statusHandler.error("Error initializing D2D model: "

View file

@ -195,9 +195,6 @@ public class D2DGridDatabase extends VGridDatabase {
}
}
/**
}
/**
* Retrieves DatabaseIDs for the n most recent model runs of a given
* d2dModelName
@ -229,7 +226,7 @@ public class D2DGridDatabase extends VGridDatabase {
// regex to match parmnnhr
private static final Pattern parmHrPattern = Pattern
.compile("(\\D+)\\d+hr");
.compile("(.*\\D)\\d+hr");
private static final String GFE_LEVEL_MAPPING_FILE = "grid/gfeLevelMappingFile.xml";
@ -1405,6 +1402,11 @@ public class D2DGridDatabase extends VGridDatabase {
}
TimeRange tr = getTimeRange(parmID, fcstHour);
if (tr == null) {
statusHandler.warn("Unexpected fcst hour (" + fcstHour + ") for "
+ parmID);
return null;
}
List<GridDataHistory> histList = new ArrayList<GridDataHistory>();
histList.add(new GridDataHistory(
GridDataHistory.OriginType.INITIALIZED, parmID, tr, null,