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

fmt: incomplete panic message #3600

gopherbot opened this issue May 8, 2012 · 2 comments

fmt: incomplete panic message #3600

gopherbot opened this issue May 8, 2012 · 2 comments


Copy link

@gopherbot gopherbot commented May 8, 2012

What steps will reproduce the problem?
1. Run

What is the expected output?
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x400cfc]

What do you see instead?
%v(PANIC=runtime error: invalid memory address or nil pointer dereference)

Which operating system are you using?

Which version are you using?  (run 'go version')
8g version go1.0.1
8g version weekly.2012-03-27 +95456588a8e1
Copy link

@rsc rsc commented May 8, 2012

Comment 1:

It is intentional that fmt turns panic while evaluating arguments into
a descriptive string.  That is usually more useful than not printing
anything and triggering a backtrace, especially when the print is
already trying to report an error.
I suppose we could change the message used in the panic to include the
pc.  It will never include a full trace as in your expected output.

Status changed to Thinking.

Copy link

@rsc rsc commented Sep 12, 2012

Comment 2:

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.