org.xml.sax.SAXParseException#printStackTrace ( )源码实例Demo

下面列出了org.xml.sax.SAXParseException#printStackTrace ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: cxf   文件: AbstractWSDLToProcessor.java
public void fatalError(SAXParseException exception) {
    if (this.env.isVerbose()) {
        exception.printStackTrace();
    } else {
        System.err.println("Parsing schema fatal error: \n" + exception.toString());
    }
}
 
源代码2 项目: TencentKona-8   文件: ConsoleErrorReporter.java
public void error(SAXParseException e) {
    if(debug)
        e.printStackTrace();
    hasError = true;
    if((e.getSystemId() == null && e.getPublicId() == null) && (e.getCause() instanceof UnknownHostException)) {
        print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.toString()), e);
    } else {
        print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
    }
}
 
源代码3 项目: jdk8u60   文件: ConsoleErrorReporter.java
public void error(SAXParseException e) {
    if(debug)
        e.printStackTrace();
    hasError = true;
    if((e.getSystemId() == null && e.getPublicId() == null) && (e.getCause() instanceof UnknownHostException)) {
        print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.toString()), e);
    } else {
        print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
    }
}
 
源代码4 项目: netbeans   文件: RestTestClientTest.java
/**
 * Test for GET request
 */
@Test
public void testGetResponseFormat() {
    // show test UI for 'customers/{customerId}' resource
    tc.expand("customers"); //NOI18N
    tc.clickOn("customerId"); //NOI18N
    // GET and application/xml should be selected by default - let's check it
    // XXX - should the default mime be app/json? IZ #156896
    assertEquals("GET", tc.getSelectedRMethod()); //NOI18N
    assertEquals("application/xml", tc.getSelectedMIMEType()); //NOI18N
    //should have three options:
    // GET, PUT, DELETE
    assertEquals(3, tc.getAvailableRMethods().length);
    // set an ID of a customer
    tc.setTestArg("resourceId", "1"); //NOI18N
    tc.doTest();
    String s = tc.getContentFromView("raw"); //NOI18N
    try {
        Utils.readXml(s);
    } catch (SAXParseException se) {
        se.printStackTrace(System.err);
        fail("invalid xml response [" + s + "]"); //NOI18N
    }

    // check app/json response format
    tc.setSelectedMIMEType("application/json"); //NOI18N
    assertEquals("application/json", tc.getSelectedMIMEType()); //NOI18N
    tc.doTest();
    s = tc.getContentFromView("raw"); //NOI18N
    try {
        JSONObject json = new JSONObject(s);
    } catch (JSONException ex) {
        ex.printStackTrace(System.err);
        fail("invalid JSON string: [" + s + "]"); //NOI18N
    }
}
 
public void fatalError(SAXParseException e) {
    if(debug)
        e.printStackTrace();
    hasError = true;
    print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
}
 
源代码6 项目: openjdk-8   文件: ConsoleErrorReporter.java
public void fatalError(SAXParseException e) {
    if(debug)
        e.printStackTrace();
    hasError = true;
    print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
}
 
源代码7 项目: energy2d   文件: XmlDecoder.java
public void warning(SAXParseException e) {
	e.printStackTrace();
}
 
源代码8 项目: EnderZoo   文件: SpawnConfigParser.java
@Override
public void fatalError(SAXParseException e) throws SAXException {
  Log.error("Error parsing Spawn config file: " + e.getMessage());
  e.printStackTrace();
}
 
源代码9 项目: jdk8u-jdk   文件: AbstractLDMLHandler.java
@SuppressWarnings(value = "CallToThreadDumpStack")
@Override
public void warning(SAXParseException e) throws SAXException {
    e.printStackTrace();
}
 
源代码10 项目: TencentKona-8   文件: ConsoleErrorReporter.java
public void fatalError(SAXParseException e) {
    if(debug)
        e.printStackTrace();
    hasError = true;
    print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
}
 
源代码11 项目: commons-vfs   文件: TestErrorHandler.java
@Override
public void warning(final SAXParseException exception) throws SAXException {
    System.err.println(header);
    exception.printStackTrace(System.err);

}
 
源代码12 项目: jdk8u60   文件: AbstractLDMLHandler.java
@SuppressWarnings(value = "CallToThreadDumpStack")
@Override
public void warning(SAXParseException e) throws SAXException {
    e.printStackTrace();
}
 
源代码13 项目: jdk8u60   文件: AbstractLDMLHandler.java
@SuppressWarnings(value = "CallToThreadDumpStack")
@Override
public void error(SAXParseException e) throws SAXException {
    e.printStackTrace();
}
 
源代码14 项目: jdk8u60   文件: AbstractLDMLHandler.java
@SuppressWarnings(value = "CallToThreadDumpStack")
@Override
public void fatalError(SAXParseException e) throws SAXException {
    e.printStackTrace();
    super.fatalError(e);
}
 
源代码15 项目: energy2d   文件: XmlDecoder.java
public void fatalError(SAXParseException e) {
	e.printStackTrace();
}
 
源代码16 项目: jdk8u60   文件: ErrorReceiverImpl.java
private void printDetail(SAXParseException e) {
    if(debug) {
        e.printStackTrace(System.out);
    }
}
 
源代码17 项目: openjdk-systemtest   文件: SummaryGenerator.java
public static void main (String[] args) {
	try { 
		DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
		DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
		Document doc = docBuilder.parse (new File(args[0]));
		doc.getDocumentElement ().normalize ();
		NodeList listOfTestResults = doc.getElementsByTagName("TestResult");
		String testPath = ""; 
		String message = ""; 
		StringBuffer resultSummary = new StringBuffer(); 

		for(int s=0; s<listOfTestResults.getLength() ; s++) {
			Node aResult = listOfTestResults.item(s);
			if(aResult.getNodeType() == Node.ELEMENT_NODE) {
				Element aResultElement = (Element) aResult; 
				testPath = aResultElement.getAttribute("url"); 
				NodeList ns = aResultElement.getElementsByTagName("ResultProperties"); 
				if ( ns != null) {
					Node resultPropertiesNode = ns.item(0);
					if (resultPropertiesNode != null) {
						if(resultPropertiesNode.getNodeType() == Node.ELEMENT_NODE) {
							Element aResultPropertiesElement = (Element) resultPropertiesNode; 
							NodeList properties = aResultPropertiesElement.getElementsByTagName("Property"); 
							for (int  i = 0 ; i < properties.getLength(); i++) {
								Node aProperty = properties.item(i); 
								if(aProperty.getNodeType() == Node.ELEMENT_NODE) {
									Element aPropertyElement = (Element) aProperty; 
									String name = aPropertyElement.getAttribute("name"); 
									if ( name != null && name.equals("execStatus")) {
										message = aPropertyElement.getAttribute("value"); 
										resultSummary.append(testPath + "   " + message + "\n");
										break; 
									}
								}
							}
						}
					}
				}
			}
		}
		FileWriter fw = new FileWriter(new File("summary.txt")); 
		fw.write(resultSummary.toString());
		fw.close();
		System.out.println(resultSummary.toString());
	} catch (SAXParseException err) {
		System.out.println ("Error processing XML JCK output report" + err.getMessage ());
		err.printStackTrace();
	}catch (SAXException e) {
		System.out.println ("Error processing XML JCK output report" + e.getMessage ());
		e.printStackTrace();
	}catch (Throwable t) {
		t.printStackTrace ();
	}
}
 
源代码18 项目: java-9-wtf   文件: GenerateWithJaxbApi.java
@Override
public void warning(SAXParseException exception) {
	System.out.println("WARN");
	exception.printStackTrace();
}
 
源代码19 项目: energy2d   文件: XmlDecoder.java
public void error(SAXParseException e) {
	e.printStackTrace();
}
 
源代码20 项目: openjdk-8   文件: AbstractLDMLHandler.java
@SuppressWarnings(value = "CallToThreadDumpStack")
@Override
public void fatalError(SAXParseException e) throws SAXException {
    e.printStackTrace();
    super.fatalError(e);
}