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

Closed
gopherbot opened this issue May 8, 2012 · 2 comments
Closed

fmt: incomplete panic message #3600

gopherbot opened this issue May 8, 2012 · 2 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented May 8, 2012

What steps will reproduce the problem?
1. Run http://play.golang.org/p/uMX6Y4ndl9

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?
Linux

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

@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.

@rsc
Copy link
Contributor

@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.
Projects
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.