473,498 Members | 1,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ICallbackEventHandler exception handling fails miserably

I'm doing ajax calls using a webpage that implements ICallbackEventHandler.
I've set it up to run a javascript function client side when the process
completes and when the process throws an exception. Within my server side
client callback event handler, I do some data access and return a result. If
the data access layer throws an exception (it may throw five different ones),
I catch it, construct an appropriate message for the end user, and throw a
new Exception with this message. Supposedly, the caller of my event handler
should catch that exception and pass the message to my client side javascript
function that handles the exception. I've done this according to all the
examples and documentation (not including the docs that are 100% incorrect)
out there. And it works. Sort of. The problem is that when my error
handling javascript function is called, I get back not only my error message
but also about 50k of gibberish that looks like a cross between a viewstate
string and a binary file viewed in Notepad. This junk on the end of the
message, if displayed to the user, causes the browser to crash. I have two
questions:

1) Seriously, what the hell?
2) How do I stop this madness?

TIA.
May 1 '06 #1
0 928

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3656
by: Ritz, Bruno | last post by:
hi in java i found that when a method has a throws clause in the definition, callers must either handle the exceptions thrown by the method they are calling or "forward" the exception to the...
6
2319
by: Daniel Wilson | last post by:
I am having exception-handling and stability problems with .NET. I will have a block of managed code inside try...catch and will still get a generic ..NET exception box that will tell me which...
1
567
by: Mike | last post by:
When trying to compile (using Visual Web Developer 2005 Express Beta; frameworkv2.0.50215 ) the source code below I get errors (listed below due to the use of ICallBackEventHandler. Ultimately I...
9
2857
by: sam | last post by:
Hi, I m using BSD stl with g++ compiler. The following code dos not throw exception if the input file is not exist: try { fin.open(f, ios::in); } catch (std::exception& e)
7
1785
by: Dan Bass | last post by:
In a somewhat complex application, I've developed plug-in architecture and am having a problem as to when to catch general exceptions for logging purposes. In each plug-in class library, for...
13
2293
by: tolisss | last post by:
Hi i have setup a global exception handler b4 Application.Run like Application.ThreadException += new ThreadExceptionEventHandler(GlobalExceptionProcessing.AppThreadException ); then after...
0
1159
by: William Sullivan | last post by:
My code goes something like this: public void RaiseCallbackEvent(string eventArgument) { try{ callbackText = SomeReallyObscureFunction(); catch(SomeReallyObscureException sroe) {...
1
1661
by: =?Utf-8?B?RGF2aWQgUmVoYWdlbg==?= | last post by:
I currently have a custom control that implements the ICallbackEventHandler interface. Currently it works when the control is added to a standard web form. It does not work however when added to...
14
2086
by: jehugaleahsa | last post by:
Hello: As an avid reader of C++ books, I know a lot of programmers out there are confronted with the challenge of exception safety. For those who don't know what it is, it is writing code in...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7208
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.