I store/count the errors inside ErrorHandler. So after parsing completed I
check the ErrorHandler is there any error or not. If error occurred I stop
proceeding and convey the error to upper layer.

Thanks & Regards,
Siva Chandran P

On Tue, Dec 11, 2012 at 1:39 AM, Fran Orzel <fmor...@us.ibm.com> wrote:

>
>
> I have an application that is parsing a file.  I have defined and set an
> ErrorHandler for the parse.  When testing with an "invalid" file my
> errorhandler runs and traces out the error as expected.  I am returning
> false for Sever and Fatal errors so that parsing will not continue.
> However, what is the correct method for letting the code that is doing the
> parsing know that an error has occurred?  I was checking for the
> DOMDocument* to be NULL, but it isn't.  The documentation says that if I
> throw and exception from the errorHandler then parsing continues and that's
> not what I want done....  Will checking the getSrcCount() give me a
> non-zero value when an error occurs?
>
> Fran

Reply via email to