Re: Service Crashing



...or wrap critical code segments into a try-catch block...

Just to observe that the most pragmatic approach here may actually be
to wrap your main work method[*] in a try/catch, doing some error-
logging in the "catch" (perhaps simply writing the message,
stacktrace, etc to the event-log). I agree that exception handling
(esp. "finally") should be "where necessary" in the code, but this
isn't often a useful debugging tool unless you get lucky.

[*]=since tihs is a service, I'm assuming that you spin up a thread in
the "start"; I mean the method you used for the delegate to start the
thread.

Marc
.



Relevant Pages

  • Determining ram in use CPU utilization
    ... I am looking to do some logging (for historical purposes) in an ... application I am writing. ... built in functions (Visual Studio 2005) does anyone have any leads on ...
    (microsoft.public.vc.language)
  • Get the calling type
    ... is there a way to determine "the calling type" in c#? ... I have found several places on the web with examples using StackTrace, ... I have also looked at the StackFrame class, ... The reason I want to do this is involved with the "logging application ...
    (microsoft.public.dotnet.languages.csharp)
  • Extending LogRecord
    ... I am writing an application which performs logging too. ... e is that i want to add customized fields in the log too.. ... could someone guide me for the same? ...
    (comp.lang.java.programmer)
  • Re: Smoke and mirrors...
    ... which includes logging of the UNDO ... Only if you think that writing 80 bytes is more overhead than ... However, if you're talking about IOs, a 8-byte IO is still an IO, just as ...
    (comp.databases.informix)
  • Re: Smoke and mirrors...
    ... which includes logging of the UNDO ... Only if you think that writing 80 bytes is more overhead than ... However, if you're talking about IOs, a 8-byte IO is still an IO, just as ...
    (comp.databases.informix)