We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We should return an error, instead of panic'ing. Since this is a library, we should let the caller deal with the error.
For example, when calling parse.Recipients() on a message with an empty To list:
parse.Recipients()
(process:24446): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed panic: ZERO pointer goroutine 25 [running]: panic(0x42edfa0, 0xc8201b8d10) /usr/local/go/src/runtime/panic.go:464 +0x3e6 github.com/sendgrid/go-gmime/gmime.ref(0x0) /Users/trevorrothaus/go/src/github.com/sendgrid/go-gmime/gmime/gmime.go:48 +0x75 github.com/sendgrid/go-gmime/gmime.AssignJanitor(0x5e00158, 0xc8201b46a8) /Users/trevorrothaus/go/src/github.com/sendgrid/go-gmime/gmime/janitor.go:22 +0x39 github.com/sendgrid/go-gmime/gmime.CastPointer(0x0, 0x41c719f) /Users/trevorrothaus/go/src/github.com/sendgrid/go-gmime/gmime/janitor.go:34 +0x81 github.com/sendgrid/go-gmime/gmime.CastInternetAddressList(0x0, 0x44bc748) /Users/trevorrothaus/go/src/github.com/sendgrid/go-gmime/gmime/internet_address.go:189 +0x21 github.com/sendgrid/go-gmime/gmime.(*aMessage).AllRecipients(0xc8201b45e8, 0x0) /Users/trevorrothaus/go/src/github.com/sendgrid/go-gmime/gmime/message.go:152 +0xc2 github.com/sendgrid/go-gmime/gmime.(*aParse).Recipients(0xc8201b8cd0, 0x0, 0x0) /Users/trevorrothaus/go/src/github.com/sendgrid/go-gmime/gmime/parse.go:64 +0x45
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We should return an error, instead of panic'ing.
Since this is a library, we should let the caller deal with the error.
For example, when calling
parse.Recipients()
on a message with an empty To list:The text was updated successfully, but these errors were encountered: