catch(Exception err)
{
Response.Clear();
Response.Write("<?xml version='1.0' ?>");
Response.Write("<error>");
writeErrorException(err);
Response.Write("</error>");
ssSql.Close();
return;
}
______________________
Paul Brinkley-Rogers
Web Developer
The Sak
[EMAIL PROTECTED]
http://www.thesak.com
-----Original Message-----
From: Thomas V. Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 6:44 AM
To: dotnet
Subject: Catch the output stream
I have an object which I Serialize to XML using the XmlTextWriter and
sending the output directly to the Response.OutoutStream.
However, if the Serialization fails for some reasion, I end up with a
half
serialized XML document, and my:
catch(Exception err)
{
Response.Write("<?xml version='1.0' ?>");
Response.Write("<error>");
writeErrorException(err);
Response.Write("</error>");
ssSql.Close();
return;
}
Which is a bit useless. What I need to do is to change what is allready
in
the OutputStream, and replace it with my error response. Otherwise the
systen in the other end, think it is some perfectly formated xml it is
getting, but it is not.
<Thomas/>
---
You are currently subscribed to dotnet as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/
---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/