Information regarding the origin and location of the exception can be identified using the exception stack trace below.
有关异常原因和位置的信息可以使用下面的异常堆栈跟踪标识。
When a task throws an exception that it does not handle, the runtime prints the exception stack trace to the console and then returns the thread to the thread pool.
当某个任务引发了它无法处理的异常时,运行时将把异常堆栈跟踪打印至控制台,然后将线程返回至线程池。
When a finalizer throws an exception that it does not handle, the runtime prints the exception stack trace to the console and then allows the finalizer thread to resume running finalizers.
当终结器引发它无法处理的异常时,运行时将把异常堆栈跟踪打印至控制台,然后允许终结器线程继续运行终结器。
To deal with this, you can generate a stack trace in the constructor of the exception object during the throw exception statement.
为了解决这一问题,可以在抛出异常语句期间,在异常对象的构造函数中生成一个堆栈跟踪。
When the server reports an unexpected exception, you can examine the classes and methods of the associated stack trace to determine which application caused, or was involved in, the exception.
当服务器报告一个意外的异常时,您可以检查关联堆栈跟踪的类和方法,来确定哪个应用程序导致了异常或者与异常有关。
If this exception isn't caught, it will immediately kill the application with an error message and stack trace dumped to the console.
如果这个异常没有被捕捉到,它将立即关闭应用程序,并将一条错误消息和栈跟踪输出到控制台。
Creating and logging the exception incurs some overhead, but the stack trace is invaluable for tracking down who caused the problem.
创建并记录异常日志会导致一些时间开销,但是堆栈跟踪可以很好地用于捕获问题原因。
In the second case, the exception has been logged and the exception message and stack trace is available, but it doesn't contain the necessary information to resolve the exception's cause.
在第二种情况中,这个异常被记录下来,并且可以看到异常消息,也能够跟踪堆,但是它并不包含足够发现异常根源的必要信息。
The way to fix it is to examine the exception that caused the ExceptionInInitializerError (shown in the stack trace under caused by:) and find a way to stop this exception from being thrown.
修复这个错误的方法是检查造成ExceptionInInitializerError的异常(在堆栈跟踪的Causedby:下显示)并寻找阻止抛出这个异常的方式。
At DIAGLEVEL 3 (default), the db2diag.log captures a stack trace back, and even gives you the line number within the code where the exception is caught.
在DIAGLEVEL3(默认设置)上,db2diag . log捕获堆栈跟踪,甚至给出代码中捕获到异常处的行号。
Now we'll add a bit of complexity by accessing the stack trace of an exception.
现在,我们将通过访问异常的堆栈跟踪信息来增加一点复杂性。
Adding an exception to the trace logger (Listing 3) prints the error message along with a full stack trace.
把异常添加到跟踪日志记录器(清单3)打印出错误消息和完整的堆栈跟踪。
And, if you want to log where the exception happened, you don't have to manually parse the stack trace.
并且,如果您想记录下异常发生在何处,您不必手工分析堆栈跟踪信息。
The stack trace includes frames from both the new and original location, with the text "End of stack trace from previous location where exception was thrown" separating the two.
堆栈跟踪同时包括新的和原来位置的帧,并通过“Endofstack tracefrompreviouslocationwhereexceptionwasthrown”文字分割两者。
But the trace of every method invoked before the exception was thrown is already available in the exception's stack trace which leaves this kind of logging redundant.
但是每个方法调用之前的异常被抛出的痕迹已经可以在异常的堆栈跟踪这使得这种记录冗余。
Logs an error using the message, and optionally the stack trace, from the given exception.
使用来自给定异常的消息和堆栈跟踪(可选)记录一个错误。
Logs a warning using the message, and optionally the stack trace, from the given exception.
使用来自给定异常的消息和堆栈跟踪(可选)记录一个警告。
Filtered information includes a standard remoting exception but no server stack trace.
筛选的资讯包括标准的远端例外状况,但没有伺服器堆叠追踪。
Complete exception information includes the exact server exception and the server stack trace.
完整的例外状况资讯包括正确的伺服器例外状况和伺服器堆叠追踪。
The stack trace is a list of the method call hierarchy that starts with the method that throws the exception and ends with the method that catches the exception.
堆栈跟踪是方法调用层次结构的列表,以引发该异常的方法开始,以捕捉该异常的方法结束。
Logs an error using the message, and optionally the stack-trace from the given exception and any inner exceptions.
使用指定之例外状况和任何内部例外状况的讯息(也可以是堆叠追踪)记录错误。
Logs an error using the message, and optionally the stack-trace from the given exception and any inner exceptions.
使用指定之例外状况和任何内部例外状况的讯息(也可以是堆叠追踪)记录错误。
应用推荐