Exceptions thrown in ICallbackEventHandler's RaiseCallbackEvent ST

G

Guest

My code goes something like this:

public void RaiseCallbackEvent(string eventArgument)
{
try{
callbackText = SomeReallyObscureFunction();
catch(SomeReallyObscureException sroe)
{
Logger.LogException(sroe); // now I know what's going on
throw new Exception("Operation failed") // and so does the user
}
}

According to the docs, the caller of RaiseCallbackEvent should catch the
exception, extract the message, then post back to the client, executing the
javascript function I specified with
Page.ClientScript.GetCallbackEventReference that handles errors. The problem
("Operation failed"), but I also get about 100k of what only can be described
as garbled text jibberyjoo stuck onto the end of my error message. My client
side error handling function (as is done in every single example I've seen)
simply takes the text of the method call and pastes it into a designated
control in the webpage. The extra nonsense on the end is not only annoying
and possibly a security hazard, but also has the effect of locking up the
browser completely. I have two questions:

1) WTF?
2) What can I do to stop this insanity!

TIA!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top