目前我的异常记录文本和堆栈跟踪:
throw new RequestValidationException("test exception", parameters, e);
我希望收集所有方法中抛出异常的参数。
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("testparam", message.toString());
throw new RequestValidationException("test exception", parameters, e);
现在我正在使用哈希表。我必须查看每个方法并检查它是否使用参数。这将耗费我数天时间。代码中有成千上万的异常情况,有没有简单的方法来显示这些值?