Tagged Questions
0
votes
3answers
50 views
.NET multi-thread and exceptions
I wrote this code snippet:
static void Main(string[] args)
{
Console.WriteLine("Start");
Thread secondThread = new Thread(ThrowAnException);
secondThread.Start();
...
0
votes
3answers
47 views
Is it possible/a good idea to dispose of a thread in its catch and re instantiate itself in the finally block?
Background: I have multithreaded application that has one main UI thread and two threads that are super loops that run for the duration of the program. The worker threads basically read in some ...
0
votes
1answer
36 views
Using Anonymous thread for catching Exceptions
I asked around regarding catching checked exceptions in the context of a thread; the accepted answer was to use Callables and Futures.
But I realized that I can simply wrap the "working" method with ...
-4
votes
0answers
34 views
“specified cast is invalid” textbox [closed]
I built a multithreading program. When I use auto complete option (no matter what settings) in textbox it throws me "specified cast is not valis" exception. what can I do? I tried to change STA to MTA ...
-1
votes
1answer
79 views
Is this a good way to record log into database? [closed]
When I handle program exceptions, I need to record error message and stack trace into file or database. I know there are EntLib Log, Log4net and NLog framework to do this. But I havent make it in my ...
0
votes
0answers
65 views
Out-Of-Process SEH
I have a c++ multi-threaded application with SEH filter ( rite now in-process - exceptions & further decisions are made in the same process ) . I realized doing a lot of work ( writing dumps , ...
2
votes
1answer
130 views
C++11 safely join a thread without using a try / catch block
According to the documentation here and here, the join method of a C++11 thread will throw a std::system_error if joinable() == false. Thus the natural way to wait for a thread to complete execution ...
0
votes
2answers
100 views
Invoke or BeginInvoke cannot be called Error
I have a program that is used by Clients world wide. I check my error logs and quite a few seem to be having an exception (listed below) thrown that I can't really figure out or trace.
I have some ...
1
vote
3answers
74 views
How to simulate ConcurrentModificationException in own class?
I have been reading "Effective Java" Item 60, which is "Favor the use of standard exceptions".
Another general-purpose exception worth knowing about is ConcurrentModificationException. This ...
1
vote
2answers
106 views
How to recover after ThreadAbortException?
I have several long-running threads in an MVC3 application that are meant to run forever.
I'm running into a problem where a ThreadAbortException is being called by some other code (not mine) and I ...
1
vote
1answer
190 views
Python thread pool that handles exceptions
I've been looking around a good implementation of a simple python thread pool pattern and really can't find anything that suits my needs. All the modules I have found either don't work, or don't ...
2
votes
1answer
100 views
Exception from thread doesnt bubbles into main thread
Here I start a task
System.Threading.Tasks.Task.Factory.StartNew(() => RefreshCache(crmClientInfo)).ContinueWith(
previous => RefreshCacheExceptionHandling(previous.Exception),
...
3
votes
1answer
249 views
Correct Way to Throw and Catch Exceptions using async/await
All, please take the following code:
Task<bool> generateStageAsyncTask = null;
generateStageAsyncTask = Task.Factory.StartNew<bool>(() =>
{
return GenerateStage(ref workbook);
}, ...
1
vote
1answer
122 views
Async Error-Handling in BackgroundWorker
How does one get a meaningful BackgroundWorker.Error when DoWork must call a delegate that might throw an exeption?
I'm implementing a static MsgBox class that exposes various ways of conveying ...
2
votes
2answers
53 views
How to get a full info on exceptions in Python threads?
When exception occurs in a thread, instead of getting full exception info, that contains line number of exception, I get this:
Unhandled exception in thread started by <function get_artist at ...