Closed peterzeller closed 5 years ago
Hi @peterzeller - I think this is because of the combination you have of a console application with a reference to Xunit... is that intentional?
I am using unquote in Xunit tests, but wanted to create a minimal example without the Xunit dependency for this issue. Seems I forgot to remove the Xunit dependency, the actual error message is:
Unhandled Exception: Swensen.Unquote.AssertionFailedException: Test failed:
Program.foo 5 = 5
System.Exception: blub
at Swensen.Unquote.Evaluation.eval(FSharpList`1 env, FSharpExpr expr)
at Swensen.Unquote.Reduction.reduce(FSharpList`1 env, FSharpExpr expr)
at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x)
at Swensen.Unquote.Reduction.reduce(FSharpList`1 env, FSharpExpr expr)
at Swensen.Unquote.Reduction.loop@126(FSharpList`1 env, FSharpExpr expr, FSharpList`1 acc)
at Program.main(String[] _arg1) in /home/peter/work/fsharp-tests/ut/Program.fs:line 11
So it seems unrelated to using Xunit.
Fixed!: https://github.com/SwensenSoftware/unquote/pull/146/commits/95d53254c83c01b5c5d2eeac9a4ce4c9616e6478
Thanks for reporting, this will be in the next release
When calling a function that throws an exception, the resulting stacktrace only includes the unquote stack and not the stack for the called function.
For example:
Terminates with the following message:
Instead, I would expect it to include functions
foo
andbar
in the stacktrace. Something like this: