hunspell / hunspell

The most popular spellchecking library.

Home Page:http://hunspell.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Completion of error handling

elfring opened this issue · comments

Would you like to add more error handling for return values from functions like the following?

The strdup is just in the fuzzer, not worth checking IMO. I doubt there's anything meaningful we could do on a fail return from close. Would be better to replace the malloc/free in newitem etc with new/delete though if you wanted to try that.

wrt static source code analysis we run coverity over this occasionally, haven't tried any others. wrt 2nd query, its rather non specific.

…, haven't tried any others.

It is just safer to handle more “exceptional” situations, isn't it? 🤔

wrt 2nd query, its rather non specific.

Can you become more aware that error detection belongs to known cross-cutting concerns? 🤔