nspcc-dev / neofs-sdk-go

Go implementation of NeoFS SDK
Apache License 2.0
6 stars 14 forks source link

Do not panic ever in SDK #600

Open carpawell opened 3 months ago

carpawell commented 3 months ago

See https://github.com/nspcc-dev/neofs-sdk-go/issues/390#issuecomment-2218503588.

roman-khimov commented 3 months ago

I think it's too broad. There are valid cases for panics. For example,

https://cs.opensource.google/go/go/+/refs/tags/go1.22.5:src/net/http/server.go;l=1576 https://cs.opensource.google/go/go/+/refs/tags/go1.22.5:src/bytes/bytes.go;l=517

carpawell commented 3 months ago

There are valid cases for panics

Agree they can appear when nothing can be done or it is a developer error. But we still panic on user's inputs.