Cranium icon indicating copy to clipboard operation
Cranium copied to clipboard

Completion of error handling

Open elfring opened this issue 8 years ago • 4 comments

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

elfring avatar Jan 10 '17 07:01 elfring

Yeah I think that's definitely something useful, I'm just not sure what the best way to handle this would be. E.g. should it exit upon receiving a null matrix, network, etc. or should we add some other mechanism for checking status built into the library

100 avatar Jan 10 '17 14:01 100

I suggest to avoid ignorance of return values a bit more. Would you like to detect every error situation as early as possible?

elfring avatar Jan 10 '17 15:01 elfring

Yes, it's probably best to detect these within functions as they occur and subsequently exit, but allow functions to return null pointers if they are user-exposed (networks, matrices) and have the user handle those

100 avatar Jan 11 '17 02:01 100

elfring avatar Jan 11 '17 07:01 elfring