[language] compare
Alice52 opened this issue · 1 comments
Alice52 commented
kotlin
golang
java
rust
Alice52 commented
golang blemish
- without syntax annotation
- without aop/validate
- without named function and default args
- without agent enhance
- slice 越界会导致 panic,而不能直接将其转换为 error
func RecoveryPanicAsError(err error) { defer func() { if r := recover(); r != nil { err = errors.New(fmt.Sprintf("recovered from panic: %v", r)) } }() }