A frequent problem I run into is finding exceptions in my logs with messages like:
Process: Ems.MailServer.Service Exception occurred at line: 0 Exception: Object reference not set to an instance of an object.
Of course in a debug environment, you can step through and find the source of the problem, but when relying on logs, there is never a line number reported with the error. It is always "Exception occurred at line: 0".
Is there a way to log information that might give a line number, or the name of the null variable?
(Please don't answer with - "You should check for null", of course if there is any expection of a null variable, I will check, but it is not practical to check every variable)
Any advice appreciated.