Omaha #3469 Improve logging of invalid grib1 files.
Former-commit-id:a8dd24f7fa
[formerlyfa77d8afc6
] [formerly95f16c448f
[formerly 043b5709262c5cc01a280f48c61b17fed32c4b59]] Former-commit-id:95f16c448f
Former-commit-id:a82cd38be2
This commit is contained in:
parent
25798d3611
commit
df7e06527c
1 changed files with 10 additions and 4 deletions
|
@ -98,6 +98,7 @@ import com.raytheon.uf.common.util.mapping.MultipleMappingException;
|
|||
* Oct 07, 2013 2402 bsteffen Decode GribDecodeMessage instead of
|
||||
* files.
|
||||
* Oct 15, 2013 2473 bsteffen Removed deprecated and unused code.
|
||||
* Jul 30, 2014 3469 bsteffen Improve logging of invalid files.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -164,11 +165,14 @@ public class Grib1Decoder extends AbstractDecoder {
|
|||
}
|
||||
return gribRecords.toArray(new GridRecord[] {});
|
||||
} catch (IOException e) {
|
||||
throw new GribException("Failed to decode grib1 file: [" + fileName
|
||||
+ "]", e);
|
||||
throw new GribException("IO failure decoding grib1 file: ["
|
||||
+ fileName + "]", e);
|
||||
} catch (NoValidGribException e) {
|
||||
throw new GribException(
|
||||
"Invalid grib1 message: [" + fileName + "]", e);
|
||||
} catch (Exception e) {
|
||||
throw new GribException("Unexpected error in grib1 file: ["
|
||||
+ fileName + "]", e);
|
||||
} finally {
|
||||
if (raf != null) {
|
||||
try {
|
||||
|
@ -424,6 +428,9 @@ public class Grib1Decoder extends AbstractDecoder {
|
|||
}
|
||||
|
||||
}
|
||||
if (data == null) {
|
||||
throw new GribException("No valid data found in grib record.");
|
||||
}
|
||||
if (gdsVars != null) {
|
||||
correctForScanMode(data, gdsVars.getNx(), gdsVars.getNy(),
|
||||
bmsPresent, scanMode);
|
||||
|
@ -1012,8 +1019,7 @@ public class Grib1Decoder extends AbstractDecoder {
|
|||
* The value of the level
|
||||
* @return The converted level type information
|
||||
*/
|
||||
private float[] convertGrib1LevelInfo(int ltype1, float lval1,
|
||||
float lval2) {
|
||||
private float[] convertGrib1LevelInfo(int ltype1, float lval1, float lval2) {
|
||||
float level1Type = ltype1;
|
||||
float level1Scale = 0;
|
||||
float level1Value = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue