resonate icon indicating copy to clipboard operation
resonate copied to clipboard

Always panic through utils.Assert

Open dfarr opened this issue 1 year ago • 4 comments

Sometimes when we encounter an intolerable error we call panic() directly, instead we could call utils.Assert(false, ...) that way we would have the opportunity to optionally turn off strict panicing in production.

dfarr avatar Nov 14 '23 16:11 dfarr

this would be nice to expose as a flag like --strict

guergabo avatar Nov 14 '23 16:11 guergabo

@guergabo I'm interested to work on this enhancement, can i work on this issue

KannappanChida avatar Dec 07 '23 09:12 KannappanChida

@KannappanChida. of course. lmk if you need any help. thank you !

guergabo avatar Dec 07 '23 15:12 guergabo

interesting approach at sqlite. They have different behaviors for asserts depending on the build: https://www.sqlite.org/assert.html#:~:text=In%20SQLite%2C%20the%20presence%20of,about%20the%20truth%20of%20X.

guergabo avatar Jan 21 '24 19:01 guergabo

@KannappanChida - curious if you are still interested in working on this?

flossypurse avatar Dec 17 '24 15:12 flossypurse