473,385 Members | 2,004 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,385 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 3312
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daylor | last post by:
hi. i have main thread , and 2 others thread (t1 ,t2 for example) how can i call from the main thread, to tell t1 to exit his thread ? (calling application.exitthread from main thread, in method...
0
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
7
by: Morris | last post by:
I want to abort a running thread, so I call MyThread.abort() function. My problem is this thread runs "almost" like a while(true) loop and I don't want the Abort() function interrupts the thread at...
10
by: Fernando Rodríguez | last post by:
Hi, Assume I have Main function that looks like this: static void Main(string args) { Action h1 = new Action(0);
1
by: Alan Baljeu | last post by:
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...
6
by: Joe HM | last post by:
Hello - I have a function that calls Thread.Abort() to stop a thread in a _Closed() Method of a GUI. The thread contains a blocking call on a TCP socket and that is the easiest way to stop...
23
by: Boltar | last post by:
Hi I'm writing a threading class using posix threads on unix with each thread being run by an object instance. One thing I'm not sure about is , if I do the following: myclass::~myclass() {...
5
by: andrew | last post by:
Hi, I have the following issue with the Thread.Abort(): The main thread creates a worker thread which waits on a process termination. void ThreadProc() { Process proc =...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.