Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How can I output details of any Unhandled Exceptions that are encountered to my log file?

Posted on 2014-08-10
2
Medium Priority
?
184 Views
Last Modified: 2014-08-10
Hi Experts,

How can I output details of any Unhandled Exceptions that are encountered to my log file?
I assume this can be done via one block of code in my application.

Regards,
Leigh
0
Comment
Question by:LeighWardle
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 40252437
Ordinarily it would depend on your application. It's often better to catch all of your exceptions in one layer so you can take appropriate actions. For example, our applications have a "user" layer and then a core layer. Our core handles catching all of the exceptions that occur so that we can log appropriately. If you don't have your project set up in an n-tier fashion, then you might try using the UnhandledExceptionEvent for this purpose.
0
 
LVL 1

Author Closing Comment

by:LeighWardle
ID: 40252452
Thanks, kaufmed.
The link helped find a very useful example here: http://www.vb-helper.com/howto_net_catch_unhandled_exceptions.html

Regards,
Leigh
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question