如何处理Web服务中的错误处理 [英] How to handle error handling in web service

查看:88
本文介绍了如何处理Web服务中的错误处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过jquery ajax调用webservice,我想在web service中进行错误处理
任何人都可以帮助处理在webservice中引发的异常

I am callin webservice through jquery ajax and i want to do error handling in web service
can anybody help to handle the exception thrown in webservice

推荐答案

在.ajax调用中使用错误函数.
Use the error function on the .ajax call.
error: function (XMLHttpRequest, textStatus, errorThrown) {
          returnVal = XMLHttpRequest.statusText + ": " + unescape(XMLHttpRequest.responseText);
      }


这篇关于如何处理Web服务中的错误处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆