473,597 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception Handling using Enterprise Library 3.1

1 New Member
Hi All:

I am trying to implement Exception Handling using Enterprise Library 3.1's Exception Handling Application Block as well as Logging Blocks.

I have a windows application developed in VB.Net (Visual Studio 2005) which have three tiers:

User Interface
Business Logic
Data Layer

I created Three Policies for each tier using Enterprise Library Configuration Utility. Where i am logging all exceptions to a Rolling Flat File, but i am lost at one certain functionality.

When exception occured in Data Layer iam unable to log Line Number of the error occured, for example:

I have a query class in which there will be number of queries placed in functions. I willfully modified one query which will results as Exception.

Erroneus Query:
Select Name, Age from Profiles where MyLower(Name) = 'bill gates'

Ps : MyLower is not a valid Scalar Function

Above query results System.Data.Ole dbException, infact Exception Handling Logging Block is able to log the same exception to Flat file as follows:

Scalar function not found: MyLower Select Name, Age from Profiles where MyLower(Name) = 'bill gates'

But it is unable to log which function and which class file the exception occured.


Please suggest me how to achieve the same. Please mail me back if you need further clarfication for my question.

Thanks,
Sriram,
Aug 12 '08 #1
0 2185

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2332
by: Daniel Wilson | last post by:
I am having exception-handling and stability problems with .NET. I will have a block of managed code inside try...catch and will still get a generic ..NET exception box that will tell me which assemblies are loaded before shutting down. In one case, some of my DB-accessing code didn't handle a NULL value properly. But try...catch wouldn't catch the exception and keep going. I'd just get the error message and then it would shut the...
1
262
by: Ray5531 | last post by:
We are developing an ASP.NET application which has a UI a business layer and a OR Mapper generated DAL layer.We have two types of Exceptions that might occure 1) Runtime Exceptions (Programmer Faults:0)) 2) Buiness Rules Exceptions.I just wondered if someone could introduce me a refernce or link from which I can get some idea on how to adopt a robust and good exception handling mechanism for our scenario. Thanks alot
1
4131
by: David Herbst | last post by:
Enterprise Library Jan 2006 with Visual Studio 2005 on Windows 2000 Server sp4. My custom exception formatter fails with a "Unable to handle exception: 'LoggingExceptionHandler'." exception. When I attached the debugger to the process and stepped into the code it executed without error. In both cases I was running a Debug build, the only difference in the case that works is that I attached the debugger to the same exact binaries....
16
2532
by: Chuck Cobb | last post by:
I'm implementing a centralized exception handling routine using the Enterprise Library Exception Management Application Block. I trap all unhandled exceptions to one place using the following method: // --- Create an Exception Handler for Thread Exceptions ---------------- Application.ThreadException += new ThreadExceptionEventHandler(OnThreadException);
3
1384
by: Wade | last post by:
Hey all, Question regarding Exception Handling w/ Application Blocks. The example given (ExceptionHandlingWithLogginQuickStart) creates a DialogResult to display the error message back to the user (AppMessageExceptionHandler.cs, line 51). How should this be done in ASP.NET? We have a control defined on our pages that we want errors to output into .... how should we accomplish this? Since our exception handler is in our business...
3
1265
by: Bruce One | last post by:
I am developing a new project in which we should have a good Exception Handling. Ive seen there is a Exception Handling App Block in Enterprise Library, also I could use the Try-Catch structure itself... What would be the best Approach ?
1
1453
by: Jarsinio | last post by:
I have some doubts about how managed exception in a VB.net aplication. In my aplicattion I have 3 clases: One clase is the UI ( Windows Forms). This class call a second clase who perform an action ( for example add a item in the database). The last class is the one who conect to the DB ( ms access) How I should manage an exception ? * What I must do when an exception occurs when the class number 3 wants to make a DB coneection an...
1
2483
by: | last post by:
I have an application that has a presentation later, business layer, and data layer. All three projects have their own exception policy, the "UI Policy", "BL Policy", "DL Policy", all of which will log the error in the application event logs. When a database error occurs such as a missing stored procedure, all three policies will log the event resulting in three different entries in the error. My boss says there is a way in the...
0
2529
by: =?Utf-8?B?UG9sbHkgQW5uYQ==?= | last post by:
Hi, I have previously used EL v 3.1 Exception Handling application block successfully. I thought I would now try to do the same with EL v 4.0. My first experiment was to replace an exception. I created a project and added the following references - 1/ Enterprise Library Exception Handling Application Block v 4.0
0
8381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8035
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6688
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5431
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3886
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2404
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1494
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1238
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.