即使我输入了自定义消息,但在发出消息时未打印该消息。下面的代码:自定义异常抛出正在打印为空的消息
public void run() throws Exception {
try{
String poNumber=null;
if(poNumber.equals(null))
{
throw new Exception("Services Purchase Order not created.");
}
}
catch (Exception e) {
info("Custom Exception Message: "+e.getMessage());
}
OUTPUT:
自定义异常消息:空