S
Steve
I have found myself being a bad programmer. I know I should trap errors and
exceptions and log them, but I'm not.... everywhere. I DO when the error
happens in my Form class because that is where I initially setup my error
log. I find now, after adding 30+ classes that when an error happens in
them, I don't do anything because I don't have easy access to the logging
functionality defined in my Form class.
I realize I've got a flawed design and that my error handling should be
abstracted from the Form class and stand on it's own. How do most of you
handle this? A LogClass with static methods(IE: LogError(), LogWarning(),
etc) or maybe a Singleton class or possibly even passing a LogClass
reference into the c'tor of every class(No!)
If you have any "really clean or slick" solutions, please share.. I'm
spinning my wheels a little at this point.
Thank you,
Steve
exceptions and log them, but I'm not.... everywhere. I DO when the error
happens in my Form class because that is where I initially setup my error
log. I find now, after adding 30+ classes that when an error happens in
them, I don't do anything because I don't have easy access to the logging
functionality defined in my Form class.
I realize I've got a flawed design and that my error handling should be
abstracted from the Form class and stand on it's own. How do most of you
handle this? A LogClass with static methods(IE: LogError(), LogWarning(),
etc) or maybe a Singleton class or possibly even passing a LogClass
reference into the c'tor of every class(No!)
If you have any "really clean or slick" solutions, please share.. I'm
spinning my wheels a little at this point.
Thank you,
Steve