An Error marked as a panic: the program is stopping because an invariant
that must hold does not. name is free — createPanicError sets it to
'PanicError' so that a bare panic prints as one, while an error marked by
panic(error) keeps the name its factory gave it.
An
Errormarked as a panic: the program is stopping because an invariant that must hold does not.nameis free —createPanicErrorsets it to'PanicError'so that a bare panic prints as one, while an error marked bypanic(error)keeps the name its factory gave it.