Dec 17, 2009, 4:49 PM
Handle exception and static method
Hi,
I have a public static method like this
If I remove "static" It works fine.
How can I use exception and static ?
Thank you...
I have a public static method like this
[AjaxMethod]
public static void ThrowException()
{
try
{
throw new Exception("An Exception was Thrown");
}
catch (Exception e)
{
Coolite.Ext.Web.ScriptManager.AjaxSuccess = false;
Coolite.Ext.Web.ScriptManager.AjaxErrorMessage = e.Message;
}
}
On client-side :function test() {
Coolite.AjaxMethods.ThrowException({
success: function(result) {
},
failure: function(errorMsg) {
Ext.Msg.alert('Failure', errorMsg);
}
});
}
This code doesn't work.If I remove "static" It works fine.
How can I use exception and static ?
Thank you...