aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/panic.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/panic.go')
-rw-r--r--src/runtime/panic.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go
index 51b57520c1..27fcf73ff4 100644
--- a/src/runtime/panic.go
+++ b/src/runtime/panic.go
@@ -656,7 +656,7 @@ func printpanics(p *_panic) {
return
}
print("panic: ")
- printany(p.arg)
+ printpanicval(p.arg)
if p.recovered {
print(" [recovered]")
}
@@ -718,20 +718,20 @@ func gopanic(e any) {
gp := getg()
if gp.m.curg != gp {
print("panic: ")
- printany(e)
+ printpanicval(e)
print("\n")
throw("panic on system stack")
}
if gp.m.mallocing != 0 {
print("panic: ")
- printany(e)
+ printpanicval(e)
print("\n")
throw("panic during malloc")
}
if gp.m.preemptoff != "" {
print("panic: ")
- printany(e)
+ printpanicval(e)
print("\n")
print("preempt off reason: ")
print(gp.m.preemptoff)
@@ -740,7 +740,7 @@ func gopanic(e any) {
}
if gp.m.locks != 0 {
print("panic: ")
- printany(e)
+ printpanicval(e)
print("\n")
throw("panic holding locks")
}
@@ -1015,7 +1015,9 @@ func throw(s string) {
// Everything throw does should be recursively nosplit so it
// can be called even when it's unsafe to grow the stack.
systemstack(func() {
- print("fatal error: ", s, "\n")
+ print("fatal error: ")
+ printpanicval(s)
+ print("\n")
})
fatalthrow(throwTypeRuntime)
@@ -1034,7 +1036,9 @@ func fatal(s string) {
// Everything fatal does should be recursively nosplit so it
// can be called even when it's unsafe to grow the stack.
systemstack(func() {
- print("fatal error: ", s, "\n")
+ print("fatal error: ")
+ printpanicval(s)
+ print("\n")
})
fatalthrow(throwTypeUser)