NLog/NLog — pull request #163 by johnrey1 (2012-12-04 23:06:29+00:00)
Title: #110 Exceptions swallowed in custom target

Most closely relates to #110, although havent tested with WCF. (My scenario is MVC4 web api)

### My understanding of NLog Exception handling
* All NLogConfiguration Exceptions should be rethrown
* NLogRuntime exceptions should be thrown only if throwExceptions is set 'true' in the nlog config (or in code)

### Changes
* Modified singlecallcontinuation class to rethrow if throwExceptions is true
* Modified base Target.cs to rethrow if throwExceptions is true
* Updated associated unit tests

### Caveat
If throwExceptions is true, relogging an exception would presumably throw another exception. Temporarily disabling throwExceptions in your handler may prevent this.

Good
```
try
{
logger.Info(msg);
...
}
catch (NLogRuntimeException rtException)
{
LogManager.ThrowExceptions = false;
logger.Error(rtException.Message);
}
```

Bad
```
try
{
logger.Info(msg);
...
}
catch (NLogRuntimeException rtException)
{
logger.Error(rtException.Message);
}
```