上一主题: ExceptionErrorReporter下一主题: ThisErrorReporter


MethodCalledErrorReporter

MethodCalledErrorReporter 跟踪器作用于方法,调用方法即表示已发生错误。 例如:

TraceOneMethodOfClass: com.bank.CheckingAccount cancelCheck MethodCalledErrorReporter "CustomerAccount:Canceled Checks Per Interval"

此指令指定只要调用了 cancelCheck() 方法(不管出于任何原因),就意味着发生了错误。 错误消息仅指出了所调用的类和方法。

如果您不知道哪些方法会抛出异常或错误,请尝试使用 ThisErrorReporter 跟踪器。