虽然清单13中的代码看起来似乎不错,但是还有一个问题——如果服务器响应请求并完成了处理但是报告了一个错误怎么办?
Despite the apparent success of the code in Listing 13, there's still a problem — what if the server responds to your request and finishes processing, but reports an error?
不过本着增强错误处理和信息搜集的精神,您应该学习如何生成HEAD请求。
In the spirit of enhanced error handling and information gathering, though, you should learn how to make HEAD requests.
错误日志包含诊断信息,并记录在处理请求时遇到的任何错误。
The error log contains diagnostic information and records any errors that it encounters in processing requests.
在策略画布中(如图21所示),您可以定义消息处理请求、响应或错误规则。
In the policy canvas, as shown in Figure 21, you can define message processing request, response, or error rules.
如果没有找到处理请求的处理程序,服务器将返回一个501错误。
If no handlers are found to handle the request, the server will return a 501 error.
在处理响应时,它将识别此类错误,并将请求重新提交到组中的另一个端点。
When processing a response, it identifies such errors and triggers the resubmission of the request to another endpoint of the group.
除了学习处理客户端请求和返回符合SOAP响应之外,您还将了解处理异常和产生SOAP错误的过程。
In addition to learning to handle client requests and send back SOAP-compliant responses, you also explore the process of handling exceptions and generating SOAP faults.
KPI历史记录请求是异步的;可以在验证数据并完成错误处理后发出事件。
The KPI history requests are asynchronous; an event can be dispatched after you have verified the data and finished the error handling.
其中一项挑战性的错误处理工作发生在以下的情况。当服务器发生故障以后,客户端需要了解请求的结果以进行继续的工作。
A challenging error-handling case occurs when a client needs to know the outcome of a request in order to take the next step, after failure of a server.
服务请求程序通常会将请求发送到服务提供程序,服务提供程序会提供请求的解决方案(如果无法对请求进行处理,则为错误消息)来进行响应。
The service requesters usually send the request to a service provider, which responds with a solution to the request or an error message if the request cannot be processed.
如果处理时间过长,则会终止该请求并向用户发送一条错误消息。
If our processing takes too long, it will be aborted and an error message sent to the user.
事务性工作可以根据请求自动撤销(假设您还没有提交它),这使得脚本中的错误处理变得更加容易。
Transactional work can also be automatically undone at your request (provided you haven't already committed it), which makes error handling in your scripts easier.
成批请求失败时如何处理错误。
具有确认的同步更新请求;esb处理错误。
Synchronous update request with acknowledgement; ESB handles errors.
不好的一面是每次需要进行添加或更改(比如实现Ajax请求的错误处理)时,您都必须要手动修改所有页面并重新测试它们。
The bad news is that every time you have to add or change something, such as implementing error handling for the Ajax requests, you'll have to manually modify all your pages and retest them.
这时,Confluence无法处理接收到的请求,同时日志文件记录了各种奇怪的错误。
At that point, Confluence was unable to process incoming requests and the log was filled with all kinds of strange errors.
图12展示了如何让IntegrationDeveloper为您创建一个模板处理程序,这样您就仅需编写可以处理请求消息和错误的方法。
Figure 12 shows how you can get Integration Developer to create a template handler for you, so that you only need to write the methods that handle the request messages and faults.
在WebSphereProcessServer(以下简称为Process Server)以前的版本中处理异步请求时,如果出现运行时错误,将生成失败事件。
When processing asynchronous requests in previous releases of WebSphere process Server (hereafter called process Server), failed events will be generated if there are any runtime errors.
但是,如果当eJB处理请求时遇到错误,servlet将捕获e JB抛出的异常并将Error Bean实例化,封装出错消息。
If, however, an error is encountered when the EJB processes the request, the servlet will catch the exception thrown by the EJB and instantiate an ErrorBean to encapsulate the error message.
这个处理程序类的实例用于过滤所有到达的请求、发出的响应和错误。
The instance of the handler class is used to filter all incoming requests, outgoing responses, and faults.
事务性同时为服务的请求者和提供者极大地简化了错误处理,但代价是付出额外的性能开销。
Transactionality simplifies error handling significantly for both the requestor and provider of the service, but at the cost of some additional performance overhead.
错误处理:如果成批请求中某些失败,spml会提供两种选择来处理这种情况:恢复和退出。
Error handling: SPML provides two options — resume and exit — for handling cases where some of the requests in a batch fail.
对于SAX和DOM工厂类,一个异常处理已请求的但不受支持的特性,另一个异常处理实例化错误。
As with the SAX and DOM factory classes, one exception handles requested — but unsupported — features, and another exception handles instantiation errors.
道理在于,该链中的处理程序之一最终将处理请求,而错误信息不会出现。
The idea is that eventually one of these handlers in the chain will handle the request, and no error is raised.
每次您调用一个可以返回错误值的函数时,就必须小心地检查请求所生成的结果正是您所希望的(如果不是,就需要对错误进行处理)。
Every time you call a function that can return an error, you need to be careful to check that your request produced the result you expected (or handle the error if it didn't).
如果要求退出,一旦遇到错误,服务器就终止剩余请求的处理,所有未执行的请求都标记为失败。
When the instruction is to exit, the server terminates the execution of the remaining requests as soon as an error is encountered, and all the requests that do not execute are marked as failed.
这就是——如您所期待的——一个异常处理器,它现在将会捕捉如果mkdir不能创建请求的目录而被抛出的E739错误。
This is — as you might expect — an exception handler, which will now catch the E739 error that is thrown if mkdir is unable to create the requested directory.
这些开发人员非常尴尬,但我告诉他们这是一个很常见的错误,特别在没有注意到是单个Servlet处理所有请求时更容易出现这样的问题!
The developers were embarrassed, but I told them it was an easy mistake to make, especially if you're unaware that a single servlet handles all requests!
如果没有匹配的IBMCognos8服务可用,请求将失败并报告一个错误,表明没有可用服务可以处理这种请求类型。
If there is no matching IBM Cognos 8 service available, the request will fail with an error stating that there is no service available to handle that type of request.
然后生成对PlaceStatisticsservlet的请求,挂接到负载或错误处理程序的回调适当地得到调用。
The request to the Place Statistics servlet is then made, and the callbacks hooked into the load or error handlers are invoked as appropriate.
应用推荐