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

it will print some wrong stack when use pr_stacktrace() with unicode thing #520

Open
zsbxp opened this issue Oct 30, 2019 · 0 comments
Open

Comments

@zsbxp
Copy link

zsbxp commented Oct 30, 2019

try
throw("测试")
catch
Class:Reason ->
lager:info("get_stacktrace:ntp", [lager:pr_stacktrace(erlang:get_stacktrace(), {Class, Reason})])
end.

In our system, the exception will throw with some Chinese word sometimes.
If that happen, it will print like this:
lager_trunc_io:print/3 line 269
lager_trunc_io:list_body/4 line 312
lager_trunc_io:list_bodyc/4 line 324
lager_trunc_io:list_bodyc/4 line 323
lager_trunc_io:print/3 line 168
lager_trunc_io:alist/3 line 421
lager_trunc_io:alist/3 line 421
lager_trunc_io:alist/3 line 448

and can not get back the stack really happened

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

No branches or pull requests

1 participant