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!