I don't know what you mean by logging John. Its not about debugging. To
me, it comes down to this: I'm making a library of useful .NET functions
mainly around System.Xml stuff. There are a bunch of things that could
go wrong. I think those things should be caught. I think it would be
really crappy to have the runtime catching those errors and throwing
stack traces. Why is this even debatable? All libraries written to this
point have asserts and all sorts of error checking. I'm trying to ask
about the best way to catch errors and deal with them.

Sam Gentile
Co-Author Wrox Professional Visual C++.NET (ISBN 1861005962 )

[EMAIL PROTECTED]
www.project-inspiration.com/sgentile
http://www.project-inspiration.com/sgentile/DotNet.htm
BLOG: http://radio.weblogs.com/0105852/
http://www.project-inspiration.com/sgentile/ScienceFiction.htm





-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
John Lam
Sent: Tuesday, May 28, 2002 8:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Need a good real-world C# Exceptions Resource or
Stategy for Library

Actually, I'm not sure that I agree that the library should not do *any*
logging. If I want to debug a library in the field, I would want to have
mechanisms whereby I could enable logging in my library (reading a
registry key, presence of an environment variable etc).

-John
http://www.iunknown.com


-----Original Message-----
From: Kirk Jackson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 8:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Need a good real-world C# Exceptions Resource or
Stategy for Library

Sorry, I misunderstood what you meant by 'handling'.

Yeah, I agree that the client should do any logging, rather than the
library.

Kirk

-----Original Message-----
From: franklin gray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 29 May 2002 10:14 a.m.
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Need a good real-world C# Exceptions Resource or
Stategy for Library


"With the libraries we create, we try to make the exceptions that a
library client receives meaningful."

so you create custom exceptions....I bet just like I said below.

".. so that the client knows that they are catching all meaningful
application exceptions:"

The client knows of all exception if the catch them like they should and
it should be their responsibility to log them if they feel the need to,
otherwise you are eating up their harddrive space for no reason.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to