Fixed bug in FormatGenerator to process exceptions

I noticed this bug because of the new way of directly parsing input.
If a parse error occurs, "out-default" will be executed with the exception as input object.