Do not panic ever in SDK #226

Open
opened 2025-12-28 18:07:30 +00:00 by sami · 2 comments
Owner

Originally created by @carpawell on GitHub (Jul 15, 2024).

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

Originally created by @carpawell on GitHub (Jul 15, 2024). See https://github.com/nspcc-dev/neofs-sdk-go/issues/390#issuecomment-2218503588.
Author
Owner

@roman-khimov commented on GitHub (Jul 16, 2024):

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

@roman-khimov commented on GitHub (Jul 16, 2024): 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
Author
Owner

@carpawell commented on GitHub (Jul 19, 2024):

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.

@carpawell commented on GitHub (Jul 19, 2024): > 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-sdk-go#226
No description provided.