Exception management is designated either through annotations or in a configuration file.
异常管理可以通过注释指定,或者在配置文件中指定。
Checking the file after each scenario ensures that you can determine which exception belongs to which scenario..
在每次场景之后检查文件,可以确保您去决定什么例外属于什么场景。
This file must be in the classpath or running the code will generate an exception.
这个文件必须在类路径中,否则运行代码将产生一个异常。
Although sending messages to a log file can be quite useful, there are often times when you would also like to display a user-friendly error message in the event of an unrecoverable exception.
虽然向一个日志文件发送消息相当有用,但是很多时候您可能还想在发生不可恢复的异常时显示一个用户友好的错误消息。
Imagine this scenario: Your application gets an exception, the exception handler kicks in and you have set it up to log to a file.
想象一下这个情形:应用程序发生了一个异常,异常处理跟踪了该异常,并建立了一个日志文件。
You should see a file identical to your original with the exception of the modified text.
您会发现文件中除了有一处文本经过修改之外,其它地方都是与原文件一样的。
And the code that reads the file should check to make sure that the version number is less than or equal to its current version and throw an exception if it's not.
而读取文件的代码应该检查这个版本号,以保证版本号小于或者等于当前版本,否则就会抛出一个异常。
It is up to the user of the POP3 client code to decide if an exception should be thrown in the warning event or a warning written into a log file or...
它从事于用户POP3客户端代码师傅一个异常应该被抛出还是写入一个日志文件等等。
Single-File Multipass images are also handled correctly with one exception: if you render without LWF and output to 32-bit Photoshop can no longer composite the image properly.
正确处理单文件多路图像也有一个例外:如果你没有LWF和输出32位的Photoshop渲染可以不再复合图像正常。
Spring will throw a wrapped IO Exception in the event the requested XML file cannot be located.
Spring将会在所请求的XML文件无法定位时抛出一个封装的ioException。
As in the previous example, the print function raises an exception, because the file was not open for writing.
正如之前的例子所示,print函数抛出了一个异常,原因是文件尚未打开以供写入。
Listing 2 shows a snippet of the Connectors.log file with an exception.
清单2给出Connectors . log文件的片段,其中包含一个异常。
This exception is also logged in the SystemOut.log file.
这个异常也在SystemOut .log日志文件中有记录。
The handler supplies a valid file status code if an exception occurs.
Handlder 程序在异常发生时提供一个有效的文件状态码。
Most of the project artifacts created in this exercise are generated automatically by the Application Developer tooling, with the exception of the WSDL file from which the two projects are generated.
此练习中创建的大部分项目构件都是通过使用Application Developer工具自动生成的,不过用于生成其中两个项目的WSDL文件例外。
Listing 9 displays a GDB exception after the mount command to the file system is issued.
清单9在向文件系统发出mount命令之后显示一个gdb异常。
Therefore, find the exception in the trace.log file and then work your way back up the corresponding thread (00000033).
因此,您需要在trace . log文件中查找异常,然后再回到对应的线程(00000033)。
When the exception occurs, control is redirected to the file given in the path attribute.
当异常发生时,控制流程就被重定向到在path属性中给定的文件上。
The INI file example runs even without the Apache Commons logging library (commons-logging), but running the LDAP example results in an exception.
即便没有Apachecommonslogginglibrary (commons - logging),这个INI文件示例仍可运行,但是运行这个LDAP示例会导致一个异常。
Listing 8 lists the code that was modified in the source of the jfs_mount.c file to create a segmentation fault at line 109 by creating a null pointer exception.
清单8列出了jfs_mount . c文件的源代码中被修改过的代码,我们在代码中创建了一个空指针异常,从而使代码在第109行产生段错误。
The only exception is Linux raw device tablespace containers, which inherently bypass the file cache.
惟一的例外是Linux原始设备表空间容器,因为它本身就绕过文件缓存。
Otherwise, a trap occurs for find, and the exception handler emits the standard file not found error.
否则,发生中断以find(查找),并且异常处理程序发出标准的file not found(文件未找到)错误。
The GNU Parted utility is an exception to this rule; like its GUI cousin, GParted, Parted resizes partitions and their contained file systems simultaneously.
GNUParted实用工具是一个例外,像它的GUI“近亲”GParted一样,同时可以调整分区及其文件系统的大小。
In the trace.log file, find the exception with the same thread ID that occurred around the same time as the error found in step 1.
在trace . log文件中找到与步骤1中找到的错误的发生时间相近的具有相同线程ID的异常。
Since the remote file may not exist yet, we need to catch the exception that Net: : SFTP will throw when we try to determine its timestamp.
由于远程文件可能不存在,所以我们需要捕捉当我们试图去查看一个不存在的文件的时间戳的时候Net: SFTP抛出的异常。
The constructor for the file_lock class accepts the name of the file to be locked, and it's important to open the file before lock is invoked; otherwise, an exception will be thrown.
file_lock类的构造函数接受要锁定的文件的名称,一定要在调用lock之前打开文件;否则会抛出异常。
The majority of these tasks are executed asynchronously (the exception is the file system action that is handled synchronously).
这些任务主要是异步执行的(只有文件系统动作例外,它是同步处理的)。
The limitation with the log file is that at the end of test suite you are not able to determine which exception belongs to which test case.
日志文件的缺陷在于,在测试套件的结尾您无法去决定什么例外与什么测试用例相对应。
It is possible that during program execution some exception is thrown, and the file is not unlocked.
在执行程序时,可能会出现抛出异常而文件没有解锁的情况。
Find an exception during the problematic time that can be related to your situation (for example, security or administrative console) in the problem server's SystemOut.log file.
在问题服务器的SystemOut . log文件中找到问题期间发生的与您的情况相关的异常(例如,安全性或管理控制台)。
应用推荐