Omaha #4834 slightly better error logging
Change-Id: Ife9a79550b959dce319d4e0c755b87cc4145642e Former-commit-id: 6f8dcebefb0935de3c009b60236a5f8a36812799
This commit is contained in:
parent
bb86bae790
commit
02e8058487
3 changed files with 19 additions and 17 deletions
|
@ -11,7 +11,8 @@ Require-Bundle: com.raytheon.uf.edex.cpgsrv;bundle-version="1.12.1153",
|
|||
com.raytheon.uf.edex.decodertools,
|
||||
com.raytheon.uf.common.monitor,
|
||||
com.raytheon.uf.common.localization;bundle-version="1.15.1",
|
||||
com.raytheon.uf.common.localization.python;bundle-version="1.0.0"
|
||||
com.raytheon.uf.common.localization.python;bundle-version="1.0.0",
|
||||
org.slf4j;bundle-version="1.7.12"
|
||||
Export-Package: com.raytheon.uf.edex.plugin.fssobs,
|
||||
com.raytheon.uf.edex.plugin.fssobs.common
|
||||
Import-Package: com.raytheon.uf.common.monitor.config,
|
||||
|
@ -26,5 +27,4 @@ Import-Package: com.raytheon.uf.common.monitor.config,
|
|||
com.raytheon.uf.edex.plugin.fssobs,
|
||||
com.raytheon.uf.edex.pointdata,
|
||||
javax.measure.converter,
|
||||
javax.measure.unit,
|
||||
org.slf4j
|
||||
javax.measure.unit
|
||||
|
|
|
@ -185,14 +185,14 @@ public class FSSObsGenerator extends CompositeProductGenerator implements
|
|||
|
||||
// We only want what we know how to decode
|
||||
if (reportType != null && inRange) {
|
||||
|
||||
FSSObsRecord fssObsRec = new FSSObsRecord();
|
||||
fssObsRec.setReportType(reportType);
|
||||
fssObsRec.setStationary(isStationary);
|
||||
fssObsRec = fss_config.getTableRow(uri);
|
||||
FSSObsDataTransform.buildView(fssObsRec);
|
||||
fssRecs.add(fssObsRec);
|
||||
checkThresholds(fssObsRec);
|
||||
try {
|
||||
FSSObsRecord fssObsRec = fss_config.getTableRow(uri);
|
||||
FSSObsDataTransform.buildView(fssObsRec);
|
||||
fssRecs.add(fssObsRec);
|
||||
checkThresholds(fssObsRec);
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Error building FSSObsRecord", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,9 +73,7 @@ public class FSSObsConfig {
|
|||
protected transient final Logger logger = LoggerFactory
|
||||
.getLogger(getClass());
|
||||
|
||||
public FSSObsConfig(URIGenerateMessage genMessage, FSSObsGenerator generator)
|
||||
throws Exception {
|
||||
|
||||
public FSSObsConfig(URIGenerateMessage genMessage, FSSObsGenerator generator) {
|
||||
this.fssgen = generator;
|
||||
}
|
||||
|
||||
|
@ -84,13 +82,13 @@ public class FSSObsConfig {
|
|||
*
|
||||
* @param uri
|
||||
* @return tableRow
|
||||
* @throws Exception
|
||||
*/
|
||||
public FSSObsRecord getTableRow(String uri) {
|
||||
public FSSObsRecord getTableRow(String uri) throws Exception {
|
||||
String dt = uri.substring(1)
|
||||
.substring(0, uri.substring(1).indexOf("/"));
|
||||
|
||||
try {
|
||||
|
||||
if (dt.equals("obs")) {
|
||||
tableRow = FSSObsUtils.getRecordFromMetar(uri);
|
||||
} else if (dt.equals("sfcobs")) {
|
||||
|
@ -98,12 +96,16 @@ public class FSSObsConfig {
|
|||
} else if (dt.equals("ldadmesonet")) {
|
||||
tableRow = FSSObsUtils.getRecordFromMesowest(uri);
|
||||
}
|
||||
|
||||
} catch (PluginException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "Could not create type: "
|
||||
+ dt + " URI: " + uri, e);
|
||||
}
|
||||
|
||||
if (tableRow == null) {
|
||||
throw new Exception("Couldn't make FSSObsRecord from type "
|
||||
+ dt + " and URI: " + uri);
|
||||
}
|
||||
|
||||
if (tableRow.getRelativeHumidity() == ObConst.MISSING) {
|
||||
Float RH = FSSObsUtils.getRH(tableRow.getDewpoint(),
|
||||
tableRow.getTemperature());
|
||||
|
|
Loading…
Add table
Reference in a new issue