Issue #185 handle CommunicationExceptions from the LevelFactory in remerged ncep grib decoder.
Change-Id: I343e4e61d5f96938e84709392c32f6d94b244b17 Former-commit-id:fe4e74407d
[formerly127dde9454
] [formerlya2db6975c9
] [formerlya2db6975c9
[formerly4dedc8b30d
]] [formerly73a08e9d4e
[formerlya2db6975c9
[formerly4dedc8b30d
] [formerly73a08e9d4e
[formerly 951c8c2a77c8f58a04a576148ac583ccdcc21e02]]]] Former-commit-id:73a08e9d4e
Former-commit-id: e11d532efe4d734504910a672862b6e7a4528a0c [formerly 57785c3dff7f653eb1377659f11622f20ae35a74] [formerlyd937284ab2
[formerlyd5d8697d9f
]] Former-commit-id:d937284ab2
Former-commit-id:3f86d825d5
This commit is contained in:
parent
a2c358d7e6
commit
31d43ab283
2 changed files with 10 additions and 1502 deletions
|
@ -67,6 +67,7 @@ import gov.noaa.nws.ncep.edex.util.grib2vars.Grib2VarsTableLookup;
|
|||
import gov.noaa.nws.ncep.edex.util.grib2vcrd.Grib2Vcrd;
|
||||
|
||||
import com.raytheon.edex.util.Util;
|
||||
import com.raytheon.uf.common.comm.CommunicationException;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.edex.plugin.AbstractDecoder;
|
||||
import com.raytheon.uf.common.dataplugin.level.Level;
|
||||
|
@ -1193,10 +1194,11 @@ public class Ncgrib1Decoder extends AbstractDecoder {
|
|||
* The level two scale factor
|
||||
* @param value2
|
||||
* The level two value
|
||||
* @throws GribException
|
||||
*/
|
||||
private void getLevelInfo(NcgribModel model, int centerID, int subcenterID,
|
||||
float levelOneNumber, float scaleFactor1, float value1,
|
||||
float levelTwoNumber, float scaleFactor2, float value2) {
|
||||
float levelTwoNumber, float scaleFactor2, float value2) throws GribException {
|
||||
String levelName = null;
|
||||
String levelUnit = null;
|
||||
double levelOneValue = Level.getInvalidLevelValue();
|
||||
|
@ -1246,9 +1248,13 @@ public class Ncgrib1Decoder extends AbstractDecoder {
|
|||
* -1));
|
||||
}
|
||||
}
|
||||
Level level = LevelFactory.getInstance().getLevel(levelName,
|
||||
levelOneValue, levelTwoValue, levelUnit);
|
||||
model.setLevel(level);
|
||||
try {
|
||||
Level level = LevelFactory.getInstance().getLevel(levelName,
|
||||
levelOneValue, levelTwoValue, levelUnit);
|
||||
model.setLevel(level);
|
||||
} catch (CommunicationException e) {
|
||||
throw new GribException("Error loading level.", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue