I'm using a .Net application to execute DTS packages within Sqlserver,I need
to have very customizable and powerful Exception maangement systems which
loggs different issues happend in the DTS package with my own errorCode. Can
somebody give me some ideas?
Thanks 6 1984
What kind of ideas do you want? The first thing is to understand the basics
of .NET Exceptions (try, catch, finally, throw, etc.) and to become familiar
with the existing .NET Exceptions of the Framework
(ArgumentOutOfRangeException, etc.) to reuse them or to know if you need to
create custom ones. Then, to define your strategy to deal with exceptions
and to decide how to report them (on screen, by e-mail, in the event log,
etc.).
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster. http://www.mztools.com
"Ali-R" <Al**@microsft.com> escribió en el mensaje
news:um**************@TK2MSFTNGP15.phx.gbl... I'm using a .Net application to execute DTS packages within Sqlserver,I need to have very customizable and powerful Exception maangement systems which loggs different issues happend in the DTS package with my own errorCode. Can somebody give me some ideas?
Thanks
Here is what I have to deal with:
I'm getting a CSV file from our clients which I need to validate it before
sending it to a DTS packages so there are two types of exceptions that might
happen:
1) Exceptions which should be thrown while parsing the CSV file
2) Exceptions which are thrown in the DTS package
Do you think I can handle both types of exceptions by implementing my own
Exception handler or by using Microsoft Exception management block?
Thanks for yuor help.
"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:%2****************@TK2MSFTNGP14.phx.gbl... What kind of ideas do you want? The first thing is to understand the basics of .NET Exceptions (try, catch, finally, throw, etc.) and to become familiar with the existing .NET Exceptions of the Framework (ArgumentOutOfRangeException, etc.) to reuse them or to know if you need to create custom ones. Then, to define your strategy to deal with exceptions and to decide how to report them (on screen, by e-mail, in the event log, etc.).
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET You can code, design and document much faster. http://www.mztools.com
"Ali-R" <Al**@microsft.com> escribió en el mensaje news:um**************@TK2MSFTNGP15.phx.gbl... I'm using a .Net application to execute DTS packages within Sqlserver,I need to have very customizable and powerful Exception maangement systems which loggs different issues happend in the DTS package with my own errorCode. Can somebody give me some ideas?
Thanks
Yes, it seems simple and some exception handlers will be enough. Some things
to consider:
- Add handlers for unhandled exceptions (which can be from Main thread,
manual threads, pool threads, finalizer thread, etc.).
- Notice that different exceptions need different treatment. For example,
OutOfMemoryException requires special care.
- Provide as much info as possible when reporting an exception; for example,
the line which caused an exception parsing the CSV file.
- Some times an exception wrappes an inner exception which contains the
actual cause of the exception. So, when reporting, try to use
Exception.GetBaseException() rather than the wrapper.
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster. http://www.mztools.com
"Ali-R" <Al**@microsft.com> escribió en el mensaje
news:eX*************@TK2MSFTNGP15.phx.gbl... Here is what I have to deal with:
I'm getting a CSV file from our clients which I need to validate it before sending it to a DTS packages so there are two types of exceptions that might happen:
1) Exceptions which should be thrown while parsing the CSV file 2) Exceptions which are thrown in the DTS package
Do you think I can handle both types of exceptions by implementing my own Exception handler or by using Microsoft Exception management block?
Thanks for yuor help.
Excellent notifications,Thanks very much
I'd like to log both types of Exceptions in the same place(in the same file
for instance) 1) Exceptions which should be thrown while parsing the CSV file 2) Exceptions which are thrown in the DTS package
What's your recommandation for that?
Thanks
"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:%2******************@tk2msftngp13.phx.gbl... Yes, it seems simple and some exception handlers will be enough. Some things to consider:
- Add handlers for unhandled exceptions (which can be from Main thread, manual threads, pool threads, finalizer thread, etc.). - Notice that different exceptions need different treatment. For example, OutOfMemoryException requires special care. - Provide as much info as possible when reporting an exception; for example, the line which caused an exception parsing the CSV file. - Some times an exception wrappes an inner exception which contains the actual cause of the exception. So, when reporting, try to use Exception.GetBaseException() rather than the wrapper.
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET You can code, design and document much faster. http://www.mztools.com
"Ali-R" <Al**@microsft.com> escribió en el mensaje news:eX*************@TK2MSFTNGP15.phx.gbl... Here is what I have to deal with:
I'm getting a CSV file from our clients which I need to validate it before sending it to a DTS packages so there are two types of exceptions that might happen:
1) Exceptions which should be thrown while parsing the CSV file 2) Exceptions which are thrown in the DTS package
Do you think I can handle both types of exceptions by implementing my own Exception handler or by using Microsoft Exception management block?
Thanks for yuor help.
Once you have decided how to log exceptions, you have to code a centralized
routine to be called from wherever an exception is catched. Needless to say
that this routine must be rock-solid...in my last project, this routine
received 2 parameters to indicate how to log it: to the event log, by-email,
or both. If you have requested a way, and it fails (what should not happen,
of course), you can still use the other way to notify that the exception
notifier routine has failed, to avoid an exception being silenced.
Then, you have to code your application and do a lot of testing since you
don´t know what exceptions can occur (I think that Java methods inform the
developer what exceptions can throw, but not in .NET). When parsing, you can
expect the IndexOutOfRangeException when strings are shorter than expected,
but only testing can provide you all exceptions that can happen.
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster. http://www.mztools.com
"Ali-R" <Al**@microsft.com> escribió en el mensaje
news:OD*************@TK2MSFTNGP10.phx.gbl... Excellent notifications,Thanks very much
I'd like to log both types of Exceptions in the same place(in the same file for instance)
1) Exceptions which should be thrown while parsing the CSV file 2) Exceptions which are thrown in the DTS package
What's your recommandation for that?
Thanks
Thanks for your suggessions.
"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:%2***************@TK2MSFTNGP14.phx.gbl... Once you have decided how to log exceptions, you have to code a centralized routine to be called from wherever an exception is catched. Needless to say that this routine must be rock-solid...in my last project, this routine received 2 parameters to indicate how to log it: to the event log, by-email, or both. If you have requested a way, and it fails (what should not happen, of course), you can still use the other way to notify that the exception notifier routine has failed, to avoid an exception being silenced.
Then, you have to code your application and do a lot of testing since you don´t know what exceptions can occur (I think that Java methods inform the developer what exceptions can throw, but not in .NET). When parsing, you can expect the IndexOutOfRangeException when strings are shorter than expected, but only testing can provide you all exceptions that can happen.
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET You can code, design and document much faster. http://www.mztools.com
"Ali-R" <Al**@microsft.com> escribió en el mensaje news:OD*************@TK2MSFTNGP10.phx.gbl... Excellent notifications,Thanks very much
I'd like to log both types of Exceptions in the same place(in the same file for instance)
1) Exceptions which should be thrown while parsing the CSV file 2) Exceptions which are thrown in the DTS package
What's your recommandation for that?
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: j vickroy |
last post by:
Hello,
I'm trying to understand the behavior of the Python 2.3 logging module (MS
Windows 2k) with regard to RotatingFileHandler. The following script
illustrates a puzzling problem. What is...
|
by: Kevin Jackson |
last post by:
Let's say we log exceptions to the windows application event log using the
Exception Management Application Block. Is there a pattern that can be used
so the exception is logged only once and not...
|
by: craig |
last post by:
I am wondering if there are some best practices for determining a strategy
for using try/catch blocks within an application.
My current thoughts are:
1. The code the initiates any high-level...
|
by: Matt |
last post by:
I have written a console application that runs as a batch job on Windows
2000 Server. Every once in a while I am getting an exception thrown to the
console. Is there a way I can create a global...
|
by: Chumma Dede |
last post by:
Hi,
I need to code a DLL in .NET which logs the response times for our asp.net
multi-tier application. The problem is we need to log the timestamps at
multiple stages in a process lifecycle...
|
by: Ray Cassick \(Home\) |
last post by:
I am trying to create a generic logging component that will accept an
exception object and create a string containing all the properties and their
values available for a specific exception.
My...
|
by: rajesh.hanchate |
last post by:
Please help me in resolving this issue.
I am using EnterpriseLibrary 2.0 Exception and logging block for
logging exceptions to event log. It works fine for sometime. After some
time it stops...
|
by: guybenron |
last post by:
Hey,
I have a sort of petty-neurotic question, I'm kinda pedantic and like
to keep my log directories clean, and this thing is bothering me to
the point of actually posting a question (couldn't...
|
by: Cramer |
last post by:
I plan to implement an exception logging feature in an ASP.NET Web
application that writes encountered exceptions to disk. The exception data
will be stored as XML.
I am planning on having each...
|
by: Robert Rawlins |
last post by:
Hi Mk,
Yeah it's got me a little bemused to be honest, I've tried playing around
with configuration options this morning and not been able to achieve
anything that works properly.
I'll keep...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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...
|
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,...
| |