473,486 Members | 2,181 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 3314
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
3524
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
1205
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
11725
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
3264
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
1891
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
496
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
5426
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
5651
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
5063
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
6967
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
7180
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...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5439
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.