0

catch ステートメントの近くでエラーが発生しています Error : required java.lang.Throwabe found org.springframework.oxm.XmlMappingException

enter code here public void writeObjectToXml(Object object, String filename) throws IOException {
    FileOutputStream fos = null;
    try {
        fos = new FileOutputStream(filename);
        try {
            marshaller.marshal(object, new StreamResult(fos));
        } catch (XmlMappingException xme) {
        }
        fos.close();
    } catch (Exception e) {
        System.out.println("Error :: " + e);
    }
}
4

1 に答える 1

0

型のキャストは、catch ステートメントの引数では許可されていません。

于 2010-07-30T12:13:42.123 に答える