Change assertion to parsing error.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>