| Erik Mavrinac [MSFT] 2004-02-07, 9:37 am |
| Which line throws the exception? What exception is thrown? In this code snippet I do not see where you are setting the variable orderForm, though
presumably that came from previously in the code. You will also have trouble if basketErrorListItems is null - you are not checking for that case after creating
a SimpleList ref via "as SimpleList".
Erik
--------------------
From: rahul_pawar@yahoo.com (Rahul)
Subject: unable to get the pipeline errors.
Date: 2 Feb 2004 10:04:09 -0800
Hi,
i am not able to get the pipeline errors. Below is the code which
throws an exception. i am trying to get the errors thown by the
pipeline from ["_Basket_Errors"] can anyone suggest me how to do
that..
Thanks in Advance.
string exMessage = string.Empty;
try
{
PipelineInfo info = new PipelineInfo("basket");
basket.RunPipeline(info);
}
catch(Exception ex)
{
exMessage = ex.Message;
}
SimpleList basketErrorListItems = orderForm["_Basket_Errors"] as
SimpleList;
if ((exMessage.Length > 0) || (basketErrorListItems.Count > 0))
{
int ii= basketErrorListItems.Count;
for(int index = 0; index < basketErrorListItems.Count - 1;index++)
{
exMessage = exMessage + "<li>" +
basketErrorListItems[index].ToString() + "<br>";
}
lblMessage.Text = exMessage;
}
else
{
Server.Transfer("SeminarBook.aspx");
}
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
|