ServiceStack/ServiceStack — pull request #561 by aaronlerch (2013-04-02 18:25:37+00:00)
Title: Improve Razor diagnostic experience when not using a debugger

Improve the experience of Razor view template exceptions by including
the error messages in the output. When running outside of a debugger,
this information is otherwise nearly impossible to retrieve.

An example output (this happens to be running under Mono on a mac):

```
ERROR: Error compiling /Views/Example.cshtml with errors:
-- /var/folders/tw/gm7sjw2n5m1fg8mp75g36ww80000gn/T/1a800d9b/15e87bd7.0.cs(53,12) : error CS0029: Cannot implicitly convert type `string' to `bool'
, Exception: Unable to compile template. Check the Errors list for details.

Unhandled Exception:
ServiceStack.Razor.Templating.TemplateCompilationException: Unable to compile template. Check the Errors list for details.
at ServiceStack.Razor.Compilation.CompilerServiceBase.CompileType (ServiceStack.Razor.Compilation.TypeContext context) [0x00000] in :0
at ServiceStack.Razor.Templating.TemplateService.CreateTemplate (System.String template, System.Type modelType) [0x00000] in :0
at ServiceStack.Razor.Templating.TemplateService.Compile (ServiceStack.Razor.ViewPageRef viewPageRef, System.String template, System.Type modelType, System.String name) [0x00000] in :0
at ServiceStack.Razor.Templating.TemplateService.Compile (ServiceStack.Razor.ViewPageRef viewPageRef, System.String template, System.String name) [0x00000] in :0
at ServiceStack.Razor.ViewPageRef.Compile (Boolean force) [0x00000] in :0
```