上一主题: MethodCalledErrorReporter下一主题: HTTPErrorCodeReporter


ThisErrorReporter

ThisErrorReporter 跟踪器与 MethodCalledErrorReporter 类似,但是它通过在已检测的对象上调用 toString() 来构建错误消息。 该跟踪器对于指出异常类的构建器非常有用。 例如:

TraceOneMethodWithParametersOfClass: ezfids.util.exception.EasyFidsException [set the init variable for your book] ThisErrorReporter "Exceptions|{packageandclassname}:Errors Per Interval"

注意:为了捕获错误消息,ThisErrorReporter 跟踪器必须与“...WithParameters”指令配合使用。

指令指定只要调用了 InvalidPINException 的构建器(“init”或“.ctor”),就构成错误。 错误消息是通过对 InvalidPINException 调用 toString() 来确定的,InvalidPINException 通常会返回应用程序开发者指定的错误消息。

如果您有一个基于自己的异常类型的自定义错误管理系统,此跟踪器将非常有用。

注意:Introscope 无法检测 java.* 软件包中的任何代码,因此将此跟踪器置于 java.lang.Exceptionjava.sql.SQLException 将不起作用。