better handling of parse error

Signed-off-by: Bjorn Westergard <bwestergard@Hueco.internal.ngpvan.net>