Completion of error handling
Would you like to add more error handling for return values from functions like the following?
- malloc ⇒ createLayer
- printf ⇒ printMatrix
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
I suggest to avoid ignorance of return values a bit more. Would you like to detect every error situation as early as possible?
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
- Are you interested to apply aspect-oriented software development?
- How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?