validation by semantic predicate - returning error message to user
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   valentin_tihomirov
Posted On:   Tuesday, December 14, 2004 09:24 PM

The documentation merely tells that returning false is enaught to fail parsing, but nothing is told about exceptions/messages shown to user. In my case, I've got the java source code of the validator at the console output. This nosense is OK, as the parser does not know anything about semantic validation, hardly it can provide any reason of the failure to the user. Please tell, what is a typical action to cease parsing of an input file, when we discover it has a wrong version?

Re: validation by semantic predicate - returning error message to user

Posted By:   Anonymous  
Posted On:   Friday, December 17, 2004 02:36 AM

Throw an application-specific exception defined by you (you can add ""exception throws"" to rules). Then catch the exception wherever you call the top parser method and present the problem to a user in a fashionable way.

Regards
Harald M.

About | Sitemap | Contact