Skip to content

Commit

Permalink
Improved panic error message in MustStringToSymbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Vachon committed Dec 7, 2020
1 parent 97d6c10 commit 96d4aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func StringToSymbol(str string) (Symbol, error) {
func MustStringToSymbol(str string) Symbol {
symbol, err := StringToSymbol(str)
if err != nil {
panic("invalid symbol " + str)
panic(fmt.Errorf("invalid symbol %q: %w", str, err))
}

return symbol
Expand Down

0 comments on commit 96d4aeb

Please sign in to comment.