如果应用程序无法提示发生了错误,则用户一般会认为他们的操作成功。
If the application fails to communicate that an error occurred, users generally assume that their action succeeded.
尽管错误对话框对程序员来说很有意义,但是它们对终端用户的意义却很小。
Although they make sense to a programmer, I think they tend to make little sense to the end user.
如果应用程序找到了最后的可能项,而这一项是错误的,就需要让系统知道用户想的究竟是什么。
If the application gets to the last possible item and that item is wrong, you'll want to teach the system about whatever item the user really did think about.
可恢复性错误——可恢复性错误是指那些可通过恰当的可选执行路径来恢复用户程序的错误。
Recoverable errors - Recoverable errors are the errors that client programs can recover from to take appropriate alternate execution paths.
系统内核所使用的内存空间通过特权码(privileged code,2级或者更低)来标记,以防止用户模式的程序访问到内核空间而发生页面错误。
Kernel space is flagged in the page tables as exclusive to privileged code (ring 2 or lower), hence a page fault is triggered if user-mode programs try to touch it.
如果不存在这样的标空间,则将向用户或应用程序返回SQL 0286n错误。
If one does not exist, a SQL0286N error will be returned to the user or application.
因为在用户指定的角色中有一个匹配错误,不可能执行应用程序。
Since there is a mismatch in the users specified, the execution of the application is not possible.
在我们自己的应用程序中,可以考虑在发生认证失败的情况时清除用户名和密码,并向屏幕上添加一条错误消息。
In your own applications, you might consider clearing the username and password when failure occurs because of authentication and adding an error message to the screen.
要从过程生成用户错误,可以使用SQLERROR变量检索一个实际的错误字符串,该错误字符串使语句无法作用于调用应用程序,如清单16所示。
To generate user errors from procedures, you can use the SQLERROR variable to return an actual error string that caused the statement to fail to the calling application, as shown in Listing 16.
在这种情况下,开发人员常常认为EJB组件不需要保护,因为它们在应用程序设计中不是“用户可以访问的”,但这种想法是一个危险的错误。
In this case, developers often assume that the EJBs do not need to be secured since they are not "user-accessible" in their application design, but this assumption is dangerously wrong.
这是惟一一次应用程序向用户显示网络通信错误的时候,因为在所有其他情况下应用程序已经下载并缓存了数据。
This is the only time that the application will show a network communication error to the user because the application will have downloaded and cached data under all other uses.
现行的404处理程序允许我们为各种错误提供一些建议链接,比如说将用户指向站点目录。
Current 404 handlers allow you to provide a few suggested links for all errors, such as pointing the users to the site directory.
如果用户在尝试访问这个资源时还没有经过身份验证,那么用户会收到401状态码,应用程序可以提供一个特殊的错误处理函数来处理这种情况。
If a user is not authenticated when trying to access this resource, the user will receive a 401 status code and the application can provide a special error handler to deal with that condition.
现在您了解了错误是在什么时候发生的,应用程序必须明确而简洁地为用户解释出错原因、出错位置以及改正方法。
Now you know that when an error occurs, the application must clearly and succinctly explain to the user what went wrong, where the error occurred, and how to fix it.
由于应用程序会立即抛出错误响应,用户可以更轻松地在焦点转移到其他字段之前改正问题。
Because the application immediately throws an error response, the user can more readily fix the problem before his focus moves to another field.
如果您可以自然地报告404错误,就可以为那些困扰不堪的用户和程序员提供更多帮助。
If you can report 404 errors gracefully, you're going to provide a lot more help to confused users and programmers.
在挂起期间,程序看起来像已瘫痪,也不显示错误消息,并且屏幕冻结或者应用程序不响应用户的动作。
During a hang, the program seems to be paralyzed, no error messages are displayed, and the screen freezes or the application does not respond to users' actions.
一条错误消息的可视化设计属性——其颜色、字体大小、位置——可以清晰地将它与应用程序用户界面的其他部分区分开来,引起用户的注意。
The visual design attributes of an error message — its color, size, and location — can clearly distinguish it from the rest of the application's user interface and capture the user's attention.
在桌面或者网页程序中,一般在发生错误时通知用户的方法是打开一个错误对话框。
A common way to tell users that something is wrong on a desktop application, or on the web is to open an error dialog.
然而由于程序员懒得寻找处理错误的方式,因此大多数情况下会打印错误消息,这样他们就将这项工作推给了用户。
The error message is printed primarily because the programmers were too lazy to figure out how to handle the error, so they pushed the work onto the user.
无论您的应用程序采用怎样的方式捕获错误,重要的事情都是明确地将错误告知用户,解释出错原因,帮助他们更正错误。
Regardless of how your application catches an error, the important thing is to clearly notify the users of the error, explain what went wrong, and help them to fix it.
服务通常由面向最终用户的应用程序(需要向最终用户提供关于错误的信息)调用。
Services are frequently invoked by end-user-facing applications that need to convey error information to the end user.
图6给出了与图5相同的错误,但是这一次错误处理代码向用户或程序员更好地说明了究竟发生了什么。
Figure 6 shows the same error as in Figure 5, but this time the error-handling code gives a much better picture of what happened to the user or programmer.
通过了解频繁出现错误的环境,开发人员可以用最好的方法设计应用程序的最终错误交互和可视化反馈,以帮助用户解决错误。
By understanding the context in which errors frequently occur, developers can best design an application's resulting error interactions and visual feedback to help the user resolve the errors.
当发生数据毁坏事故,例如软件故障、硬件故障、错误的应用程序逻辑和用户错误后,可以使用这些备份将数据库恢复到适当的状态。
These backups can be used to restore databases to their proper state after data corruption events, such as software failures, hardware failures, bad application logic, and user errors.
在清单1中,您将看到一个简短程序,该程序尝试打开一个不太可能存在的文件,并使用两种不同的方法向运行该程序的用户报告错误。
In Listing 1, you'll find a short program that tries to open a file that is unlikely to exist and reports the error to whomever is running the program, using two different techniques.
应用中发生的许多最常见的程序错误都是简单的误配置的结果,一旦用户了解应用的基本详细信息就可以轻松对其进行纠正。
Many of the most common bugs that occur in applications take the form of a simple misconfiguration that is easily remedied once the user understands the underlying details of the application.
清单13展示了一个特定的错误如何将控制转移给退出处理程序,其中根据SQLCODE的值返回用户定义的错误消息。
Listing 13 demonstrates how a specific error can transfer control to the exit handler where a user-defined error message is returned depending on the value of the SQLCODE.
应用程序可能会崩溃,磁盘可能出故障,用户也经常会犯错误,以致损坏数据。
Applications can crash, disks can fail, and often users can make mistakes that compromise data.
应用程序可能会崩溃,磁盘可能出故障,用户也经常会犯错误,以致损坏数据。
Applications can crash, disks can fail, and often users can make mistakes that compromise data.
应用推荐