parser: Add versions of parse functions which throw exceptions.
parser: Add versions of parse functions which throw exceptions.

Also added a wrapper which catches parsing exceptions and supports
defining a handler for handling them.

poljar/mario