471,325 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Int32.Parse calling Thread.Abort?

My code calls int.Parse(text), which throws a System.Format exception. This is fine
because text is all letters, and I explicitly catch the exception. However, my program
never receives the System.Format exception. Instead, I get this in the output, and I
receive a ThreadAbortException:
A first chance exception of type 'System.FormatException' occurred in mscorlib.dll

Additional information: Input string was not in a correct format.

A first chance exception of type 'System.Threading.ThreadAbortException' occurred in
mscorlib.dll

Additional information: Thread was being aborted.

A first chance exception of type 'System.Threading.ThreadAbortException' occurred in
kbvalidatelib.dll

Additional information: Thread was being aborted.

I don't want the Thread to abort. What can I do?


Jul 28 '05 #1
1 3219
Alan Baljeu <al***@cornerstoneSPAMBLOCKmold.com> wrote:
My code calls int.Parse(text), which throws a System.Format exception. This is fine
because text is all letters, and I explicitly catch the exception. However, my program
never receives the System.Format exception. Instead, I get this in the output, and I
receive a ThreadAbortException:
A first chance exception of type 'System.FormatException' occurred in mscorlib.dll


That sounds extremely odd. Are you sure the thread wasn't being aborted
for some other reason?

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 28 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Daylor | last post: by
reply views Thread by Bryan | last post: by
7 posts views Thread by Morris | last post: by
10 posts views Thread by Fernando Rodríguez | last post: by
1 post views Thread by Alan Baljeu | last post: by
23 posts views Thread by Boltar | last post: by
5 posts views Thread by andrew | last post: by

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.