473,387 Members | 1,476 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how do I examine parameters in an exception?

If I enable debug at C# exceptions, it dutifully breaks and shows me the stack
of called procedures. At the top (of my list) is DateTime.ParseExact() and it
does through an exception if I proceed.

But, how can I examine the parameters to that call to see what it doesn't like?

tnx,
/steveA
Nov 15 '05 #1
4 1188
/steveA, two quick options, you can put a break point right before the call
to your exception throwing function or put some debug statements which spit
out the variables being passed.

--
Greg Ewing [MVP]
http://www.citidc.com

<he**@work.r.us> wrote in message
news:hc********************************@4ax.com...
If I enable debug at C# exceptions, it dutifully breaks and shows me the stack of called procedures. At the top (of my list) is DateTime.ParseExact() and it does through an exception if I proceed.

But, how can I examine the parameters to that call to see what it doesn't like?
tnx,
/steveA

Nov 15 '05 #2
right click paramater -> quickwatch.

he**@work.r.us wrote in message news:<hc********************************@4ax.com>. ..
If I enable debug at C# exceptions, it dutifully breaks and shows me the stack
of called procedures. At the top (of my list) is DateTime.ParseExact() and it
does through an exception if I proceed.

But, how can I examine the parameters to that call to see what it doesn't like?

tnx,
/steveA

Nov 15 '05 #3
On Sat, 27 Sep 2003 00:32:36 -0400, "Greg Ewing [MVP]"
<gewing@_NO_SPAM_gewing.com> wrote:
/steveA, two quick options, you can put a break point right before the call
to your exception throwing function or put some debug statements which spit
out the variables being passed.


Let me be more precise. I have a dataset where I have "dynamically" constructed
a table, including a column of type System.DateTime. I then call ds.ReadXml()
to process the input. Unless code is available for this, I can't step into it,
nor do a quickwatch. If I set debug to halt on a thrown exception, the stack
shows a call to DateTime.ParseExact() on top - but there is no way to examine
the variables (I think it might be because the exception is on its way out).

Anyway, if instead, I do a table.Rows.Add( new Object[] {...} ) of the same
strings from the xml message, this works fine! gag!

Is this a feature or bug of ReadXml? I'd like to know what the other parameters
are to the ParseExact()...

/steveA
Nov 15 '05 #4
/steveA, if sounds like you are putting an invalid Date in your dataset.
Try removing the dates (set them to null). If that works then check the
format of your dates to make sure that they are XML compliant. If that
doesn't work post here with the results and some sample data.

--
Greg Ewing [MVP]
http://www.citidc.com

<he**@work.r.us> wrote in message
news:ri********************************@4ax.com...
On Sat, 27 Sep 2003 00:32:36 -0400, "Greg Ewing [MVP]"
<gewing@_NO_SPAM_gewing.com> wrote:
/steveA, two quick options, you can put a break point right before the callto your exception throwing function or put some debug statements which spitout the variables being passed.
Let me be more precise. I have a dataset where I have "dynamically"

constructed a table, including a column of type System.DateTime. I then call ds.ReadXml() to process the input. Unless code is available for this, I can't step into it, nor do a quickwatch. If I set debug to halt on a thrown exception, the stack shows a call to DateTime.ParseExact() on top - but there is no way to examine the variables (I think it might be because the exception is on its way out).
Anyway, if instead, I do a table.Rows.Add( new Object[] {...} ) of the same strings from the xml message, this works fine! gag!

Is this a feature or bug of ReadXml? I'd like to know what the other parameters are to the ParseExact()...

/steveA

Nov 15 '05 #5

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

Similar topics

3
by: Simon Harvey | last post by:
Hi everyone, I'm having a very frustrating problem executing a stored procedure. I'll put the code at the bottom. When I build the SP and add all the parameters everything goes as expected....
7
by: Brad Quinn | last post by:
Is there a way to get the values of the paramaters to a method programatically? I know that I can use reflection to find out the parameter names and types, etc., but I want to know the values...
7
by: mp | last post by:
No value given for one or more required parameters. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information...
28
by: C# Learner | last post by:
Note ---- Please use a fixed-width font to view this, such as Courier New. Problem
0
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource...
2
by: Hexman | last post by:
Hello All, Well I'm stumped once more. Need some help. Writing a simple select and update program using VB.Net 2005 and an Access DB. I'm using parameters in my update statement and when trying...
0
by: AxleWacl | last post by:
Hi, The below error is what I am receiving. The code im using is below the error, for the life of me, I can not see where any parameter is missing..... Server Error in '/FleetcubeNews'...
5
by: mnarewec | last post by:
Hi folks, I want to create a procedure where by it will take a sqlcommand, a string, and property. I want to use this procedure to add parameters to my sql command of type stored procedures since I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.