Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScriptRuntimeException.ToString() should return InnerException information #225

Open
Ansssss opened this issue Feb 24, 2020 · 1 comment

Comments

@Ansssss
Copy link

Ansssss commented Feb 24, 2020

The Core CLR's implementation of Exception.ToString() includes details about the InnerException. It would be nice if the ScriptRuntimeException.ToString() method did so as well. The alternative is to search out that specific exception type and write code specifically to examine the InnerException property and log it.

@xoofx
Copy link
Member

xoofx commented Apr 10, 2020

The problem is that Scriban is not a scripting engine that should give access to internal stack trace in normal mode (scriban scripts are usually used in end-user contexts, not by "developers").

But It's possible to do what you want, though it would require maybe to put a public static bool EnableDisplayInnerException {get; set;} on ScriptRuntimeException and change the ToString() method accordingly. PR welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants