?
Solved

exception handling block with console application

Posted on 2009-05-12
6
Medium Priority
?
307 Views
Last Modified: 2012-08-14
Hi

I am using vb.net 2005 and writing a console application. I thought I would look at using enterprise library 2.0 to handle and log my exceptions. The EHB requires a config file for the application to configure the exception policies and the like but I didn't think console applications had config files. I'm not a programmer by trade so I am probably wrong and way behind the times. I created a new console application and saw that I can add an app.config file. Before I go any further I just wanted to check it is ok to use add and app.config file to a console application and in turn use the EHB.

Many thanjks
0
Comment
Question by:andieje
  • 3
  • 3
6 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 24364370
If it does work then it should be fine depending on the application and the deployment scenario. Would it be not easier to use your own exception handling?
0
 

Author Comment

by:andieje
ID: 24364830
I don't know if it would be better to use my own exception handling. I was assuming the enterprise library would help me to use best practices and things like that. I did ask a question about exception handling and teh best way to do it in my console application here. This question also shows the way exceptions are currently handlied in the application

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_24385570.html

any comments are more than welcome

thanks
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24365288
It depends on the size of the application. I have provided many links on that page so you can explore all the options.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:andieje
ID: 24369360
Hi

I looked at those links and didn't really think any of them were suitable. Many of them were for a global exception handler and I wasn't really looking for that. One of them did email you the errors but included a screen print of the user's screen which I think is illegal so that wasn't any use either. As you can see from this question I have been looking at using the exception handling feature of the enterprise library as this can automatically log your errors to database or email or file or application log. This is more along the lines of what I wanted. I just haven't been able to get the thing to work. Well only just!
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24372125
>but included a screen print of the user's screen
You can modify the code to suit your needs.
0
 

Author Closing Comment

by:andieje
ID: 31580482
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

840 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