Then you have to put a try..catch around your own code, that's all. You cannot implement a catch..all exceptions handler (I think that is what you are searching for).
Another thing could be to write your own ExceptionConverter which will log your errors. See the source code of AjaxPro at codeplex.com. If you have any questions about how to write a converter come back to the group here. Regards, Michael On 9/25/06, Luciano Gmail <[EMAIL PROTECTED]> wrote: > > ok, but if i want to treat the exception on the server ??? > > thanks again. > > Luciano Sampaio Martins de Souza > Ciência da Computação - UNIT > > ----- Original Message ----- > From: "Michael Schwarz" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Monday, September 25, 2006 11:09 AM > Subject: [ajaxpro] Re: Global.asax and Application_Error ?!?! > > > > Hi, > > this is by design because if there is an exception you will not get a > JSON formatted string back to the client (you will get the application > error html code). If you check the result in the callback on the > client-side JavaScript code you will have a property res.error which > includes the exception. > > Regards, > Michael > > > > On 9/25/06, Luciano Gmail <[EMAIL PROTECTED]> wrote: > > > > Hi, I'm having problems with global.asax, when a error occurs in a normal > > method (without [AjaxPro.AjaxMethod]) i can catch the error in my > > Application_Error into global.asax, but if the method is > > [AjaxPro.AjaxMethod] e doesn't call Application_Error into global.asax!!!! > > Does anybody know how can i solve this ??? > > > > // Works Fine > > protected void Page_Load(object sender, EventArgs e) > > { > > throw (new NullReferenceException()); > > } > > void Application_Error(object sender, EventArgs e) > > { > > Exception Ex = Context.Error.GetBaseException(); > > string Erro = "URL: " + Ex.TargetSite + " Erro: " + Ex.Message; > > } > > > > // Doesn't Work > > protected void Page_Load(object sender, EventArgs e) > > { > > AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default)); > > } > > [AjaxPro.AjaxMethod] > > protected void test(object sender, EventArgs e) > > { > > throw (new NullReferenceException()); > > } > > void Application_Error(object sender, EventArgs e) > > { > > Exception Ex = Context.Error.GetBaseException(); > > string Erro = "URL: " + Ex.TargetSite + " Erro: " + Ex.Message; > > } > > > > Luciano Sampaio Martins de Souza > > Ciência da Computação - UNIT > > > > > > > > > > > > > > > > > > > > > > -- > Best regards | Schöne Grüße > Michael > > Microsoft MVP - Most Valuable Professional > Microsoft MCAD - Certified Application Developer > > http://weblogs.asp.net/mschwarz/ > http://www.schwarz-interactive.de/ > > Skype: callto:schwarz-interactive > MSN IM: [EMAIL PROTECTED] > > > > > > -- Best regards | Schöne Grüße Michael Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer http://weblogs.asp.net/mschwarz/ http://www.schwarz-interactive.de/ Skype: callto:schwarz-interactive MSN IM: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ajaxpro The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/ Don't forget to read my blog at http://weblogs.asp.net/mschwarz/ -~----------~----~----~----~------~----~------~--~---
