-1

When a SAXParseException occur I want the exception to return -1. but I dont know how I should do it because I can't handle that exceptions. Any ideas how I should do? At the moment when the exception occur it print this:

VARNING: org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace 
characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '1'.

Process finished with exit code 0 

1 Answers1

0

Sounds like you need:

try {
  // whatever code might throw SAXParseException
} catch (SAXParseException e) {
  return -1;
}
Andy Turner
  • 137,514
  • 11
  • 162
  • 243