0
我正在使用StAX解析器,它使用XMLStreamReader
接口。 XMLSteamReader
。 next
將拋出XMLStreamException
。return responseEntity break flow
當我回來,打破流程,使用ResponseEntity實例
例:
catch (IOException | XMLStreamException e) {
message = e.getMessage();
log.debug(message);
return new ResponseEntity<String>(message, HttpStatus.BAD_REQUEST);
}
的消息,我得到:
[DEBUG] test.rng (No such file or directory)
當我不回,
我收到:
[DEBUG] test.rng (No such file or directory)
[DEBUG] "fservice/.../1.2.3/1/test.rng.xml" (Line 16): The end-tag for element type "elem" must end with a '>' delimiter.
現在,我還需要顯示第二條消息,因爲它更具描述性。我怎樣才能做到這一點?
但是,我檢查,它是同樣的問題,正在解決?爲什麼兩個不同的調試信息 - – psedonerd
「爲什麼兩個不同的調試消息?」不知道。實際上並不清楚爲什麼第一條消息是它的原因 - 你沒有顯示'DEBUG.message'是什麼。 –
所以我猜我不能回來,爲了得到相同的信息?但是這不正確嗎? – psedonerd