Commerce Server General - unable to get the pipeline errors.

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > February 2004 > unable to get the pipeline errors.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author unable to get the pipeline errors.
Rahul

2004-02-07, 9:37 am

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");
}
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.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com