my service has a functions that gets triggered by a timer.. my code
catches a nullref exception but i cant get the stacktrace for it... i
only get information about which function that generated the exception
not on which line it occurred... Is there a special way to catch the
stacktrace of exceptions caught in a windows service?? Since i dont
get a row number i dont know which row generated the exception. any
ideas?
sampleTimer_Ela psed(..)
{
try
{
..
..
<some code that generates a nullref exception>
..
..
}
catch (System.Excepti on ex)
{
StreamWriter logg = File.AppendText (..);
logg.WriteLine( "{0}: {1}, trace: {2}",DateTime.N ow.ToString(),
ex.Message, ex.StackTrace):
logg.Close();
}
}
--
lajo_79
------------------------------------------------------------------------
lajo_79's Profile:
http://www.highdots.com/forums/m918
View this thread:
http://www.highdots.com/forums/t3014065