KafkaLite icon indicating copy to clipboard operation
KafkaLite copied to clipboard

Completion of error handling

Open elfring opened this issue 10 years ago • 2 comments

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

elfring avatar Sep 09 '15 12:09 elfring

If malloc actually failed we are looking at a catastrophic error. Should an assert suffice?

Also I was considering the concept of exposing alloc/free via allocator interfaces so that malloc is not directly exposed. This allows the embedder to provide an alternate memory manager if need be. How do you feel about that?

panyam avatar Sep 09 '15 17:09 panyam

I do not like the macro "assert" for the mentioned use case here because corresponding checks will be omitted again if the preprocessor symbol "NDEBUG" would be defined.

How do you think about to improve static source code analysis also for your software?

How would another memory manager help here?

elfring avatar Sep 09 '15 21:09 elfring