Closed serejja closed 7 years ago
Hi! I'm starting to use gomusicbrainz in my project and encountered a quite simple but annoying issue - there are 2 cases that call log.Fatalln(err) (namely https://github.com/michiwend/gomusicbrainz/blob/master/gomusicbrainz.go#L140 and https://github.com/michiwend/gomusicbrainz/blob/master/gomusicbrainz.go#L147), and thus don't give any chance to handle these errors.
log.Fatalln(err)
Is there any reason to consider these errors really fatal? Looks like simple return err should be enough here.
return err
Hi @serejja
yeah you are right, it'd be better to return these errors. I already saw your pr, will merge it. Thx for contributing!
Hi! I'm starting to use gomusicbrainz in my project and encountered a quite simple but annoying issue - there are 2 cases that call
log.Fatalln(err)
(namely https://github.com/michiwend/gomusicbrainz/blob/master/gomusicbrainz.go#L140 and https://github.com/michiwend/gomusicbrainz/blob/master/gomusicbrainz.go#L147), and thus don't give any chance to handle these errors.Is there any reason to consider these errors really fatal? Looks like simple
return err
should be enough here.