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.OledbException, 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,