Skip to content

Commit 27d649a

Browse files
John LageLagejohn
authored andcommitted
gh-52 add mention of default val to oscTempFractionDigits user guide entry, change warning about bad value to an exception
1 parent e1470b7 commit 27d649a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/MMTC_Users_Guide.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,7 @@ Always set this value to false if using the AMPCS telemetry source plugin’s Am
13721372
|OPTIONAL
13731373
|INT
13741374
|The maximum number of fractional/decimal digits to which the oscillator temperature is to be written in the Time History File before rounding takes place.
1375+
Defaults to 9 digits if key isn't included in config or if the value provided can't be parsed.
13751376

13761377
|product.sclkScetFile.create
13771378
|REQUIRED

mmtc-core/src/main/java/edu/jhuapl/sd/sig/mmtc/cfg/MmtcConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ public Integer getSclkScetApplicableDurationDays() {
901901
* time history file
902902
* @return the integer specified in the config unless key isn't present or can't be parsed, then return safe default
903903
*/
904-
public int getOscTempFractionDigits() {
904+
public int getOscTempFractionDigits() throws MmtcException {
905905
final String keyName = "table.timeHistoryFile.oscTempFractionDigits";
906906
int numDigits = 9;
907907

@@ -912,7 +912,7 @@ public int getOscTempFractionDigits() {
912912
logger.debug("Key {} not found in TimeCorrelationConfigProperties: defaulting to value {}", keyName, numDigits);
913913
}
914914
} catch (Exception e) {
915-
logger.warn("Failed to parse integer provided in key {}, defaulting to {}", keyName, numDigits);
915+
throw new MmtcException(String.format("Failed to parse value provided in config key %s, ensure it's a valid integer.", keyName), e);
916916
}
917917
return numDigits;
918918
}

0 commit comments

Comments
 (0)