Skip to content

MeasurementParseException thrown with message in data #443

@sardonicpresence

Description

@sardonicpresence

DefaultFormat.check() appears to misuse a MeasurementParseException constructor, by building a message string but treating it as the parsedData.

I'm assuming that something more like the following is desired:

throw new MeasurementParseException(message, csq, index);

I'm currently working around this by checking for MeasurementParseExceptions with the message "Parse Error" and taking the message from getParsedString() instead.

It's easily reproduced by attempting to parse an arbitrary unrecognised text string e.g.:

SimpleUnitFormat.getInstance().parse("invalid");

Metadata

Metadata

Assignees

Labels

Projects

Status

👀 In review

Relationships

None yet

Development

No branches or pull requests

Issue actions