Improve error messages of FsiEvaluationSession

This helps debug situations similar to https://github.com/fsharp/FSharp.Compiler.Service/issues/199
Actually in this case .ToString doesn't give enough info so I need %A. I'll update the pull request with a try with
________________________________
From: Don Syme<mailto:notifications@github.com>
Sent: ‎01/‎09/‎2014 16:19
To: fsharp/FSharp.Compiler.Service<mailto:FSharp.Compiler.Service@noreply.github.com>
Cc: Gustavo Guerra<mailto:gustavo@codebeside.org>
Subject: Re: [FSharp.Compiler.Service] Improve error messages of FsiEvaluationSession (#200)

> @@ -467,7 +467,7 @@ type internal ErrorLoggerThatStopsOnFirstError(tcConfigB:TcConfigBuilder, fsiStd
>          errors <- errors + 1
>          if tcConfigB.abortOnError then exit 1 (* non-zero exit code *)
>          // STOP ON FIRST ERROR (AVOIDS PARSER ERROR RECOVERY)
> -        raise StopProcessing
> +        raise (StopProcessing (sprintf "%A" err))

There is a small rish that this "sprintf" may fail, raising a new exception.  Can you place a

    try ... with _ -> ""

around the sprintf call please?

Also the sprintf call can be replaced by (err.ToString()), though still use an error handler.

---
Reply to this email directly or view it on GitHub:
https://github.com/fsharp/FSharp.Compiler.Service/pull/200/files#r16958539