-
Notifications
You must be signed in to change notification settings - Fork 655
Milestone
Description
E.g. there is
quickfixj/quickfixj-core/src/main/java/quickfix/SessionSettings.java
Lines 368 to 374 in 895224d
| public boolean getBool(SessionID sessionID, String key) throws ConfigError, FieldConvertError { | |
| try { | |
| return BooleanConverter.convert(getString(sessionID, key)); | |
| } catch (final FieldConvertError e) { | |
| throw new ConfigError(e); | |
| } | |
| } |
but FieldConvertError is never thrown but wrapped into ConfigError.
Then there is
quickfixj/quickfixj-core/src/main/java/quickfix/SessionSettings.java
Lines 306 to 312 in 895224d
| public int getInt(SessionID sessionID, String key) throws ConfigError, FieldConvertError { | |
| try { | |
| return Integer.parseInt(getString(sessionID, key)); | |
| } catch (final NumberFormatException e) { | |
| throw new FieldConvertError(e.getMessage()); | |
| } | |
| } |
where ConfigError could be thrown by getString.
I think getBool (and other methods that have this behaviour) should be changed to not mask the FieldConvertError so that it is clear whether there is a problem with the key (i.e. setting was not found) or the value (i.e. value could not be converted).
vinipx
Metadata
Metadata
Assignees
Labels
No labels