PeterKottas / DotNetCore.WindowsService

Simple library that allows one to host dot net core application as windows services. Perfect solution to power micro-services architecture.
MIT License
568 stars 150 forks source link

The service threw an unhandled exception: System.UnhandledExceptionEventArgs #96

Open KillyMXI opened 6 years ago

KillyMXI commented 6 years ago

This is exactly what I got in my console:

The service threw an unhandled exception: System.UnhandledExceptionEventArgs

e.ToString() haven't done what was expected in this case. From my understanding of the situation, UnhandledExceptionEventArgs can be tricky. Either it is e.Exception.ToString() that should be written there, or some manually constructed message (I often find it useful to log InnerException right away, if available.)

https://github.com/PeterKottas/DotNetCore.WindowsService/blob/4c0052bef2217c3f6b3ec15a98e23335fc07aa88/Source/PeterKottas.DotNetCore.WindowsService/ConsoleServiceHost.cs#L126

PeterKottas commented 6 years ago

Yep you're totally right, I'll fix this once we accumulate a few more issues.