jqgrid服务器异常错误消息 [英] jqgrid server exception error messages

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

问题描述

有没有办法在我的jqGrid中显示从服务器发送的自定义异常消息????我的函数之一执行throws子句并引发一些异常.我需要显示与此引发的异常相关的错误消息...在jqGrid中有没有办法做到这一点???

Is there a way to show custom exception messages sent from the server in my jqGrid???? One of my function does a throws clause and throws some exception. I need to disoplay the error message relative to this thrown exception... Is there a way to do that in jqGrid???

推荐答案

您没有指定在哪个jqGrid操作中可能会引发异常.您可以使用不同的事件处理程序来接收来自异常的错误消息的文本并对其进行解码.

You don't spectify in what jqGrid operation the exception could be throwen. There are different event handler which you can use to receive the text of the error message from the exception and decode it.

例如 loadError(xhr,st,err)可用于显示错误消息,该错误消息在加载jqGrid期间出现在服务器上.我的意思是,服务器在ajax请求上返回的错误.

For example loadError(xhr,st,err) can be used to display the error messege which appears on the server during the loading of the jqGrid. I mean here the errors returned by the server on the ajax requests.

还可以使用 errorTextFormat(data)解码表单编辑的ajax请求期间服务器发出的错误.或 errorfunc(rowid,res,stat) 内联编辑单元格编辑.

Additionally errorTextFormat(data) can be used to decode errors come up from the server during the ajax requests of the form editing. or errorfunc(rowid,res,stat) for the inline editing and errorCell(serverresponse,status) for cell editing.

因此,您可以在不同位置使用相应的事件处理程序函数来解码异常消息的文本.

So you can use the corresponding event handler functions in different places to decode the text of the exception message.

这篇关于jqgrid服务器异常错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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