I would like to write a helper function which build the exception message to write to a log. The code look like:
if(IsWebApp)
{
use HttpContext to get the Request Path and RawUrl
}
else
{
//else it a winform/console
Use Assembly to get executing path.
}