Replace panic with errors

This pull request is just a suggestion for people consuming the library who don't want to have to recover from gosnow potentially raising a panic. Please ignore this pull request if you wish to maintain the original behaviour.