ModelFactoryGenerateLogForException Method
Generates a log for an exception.
Namespace: MobileTrack.Common.ExtensionsAssembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
public static LogDto GenerateLogForException(
EventId exceptionEvent,
Exception exception
)
- exceptionEvent EventId
- The EventId related to the exception
- exception Exception
- The exception itself
LogDtoGenerated
LogDto for exception objects
The irony of throwing an exception while logging an exception is not lost on me, but it's a necessary evil; if we cannot save the exception
to the database, it will break the application, which is a lot worse.