TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
BjornArne Dybvik
NA
42
651
Problems finding which process throws ‘Unexpected exception’
Jan 8 2020 3:25 AM
Hi!
Happy new year!
My name is Bjorn Arne Dybvik.
I am currently working on an assignment that consists of finding out what is causing the following error:
'Unexpected exception occured in a worker thread'
I have worked a lot on it and have managed to "catch" the error in the method'
private void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs args)
{
var aggException = args.Exception.Flatten();
foreach (var exception in aggException.InnerExceptions)
{
LogErrorMessage($"Aggregate exception occured in a worker thread {sender.ToString()} ", exception);
}
Exception e = args.Exception;
LogErrorMessage("Unexpected exception occured in a worker thread", e);
}
But I have no clue how to find out where the error is coming from (stacktrace is empty).
Does anyone know how to find out what is causing the error?
Best regards
Bjorn Arne Dybvik
Reply
Answers (
3
)
How to add text to speech feature in .net MVC
Blazor, call Server Side Controller from .razor page