Embed Notice
HTML Code
Corresponding Notice
- Embed this noticethis is by far better than exceptions. it forces other devs who want to use your api to think about checking for errors at least once. You could go even further and intentionally crash the process whenever functions from your api get called without an pointer for error checking. stubborn people could still ignore the error code but in that case, they do it intentionally and it is not your fault, if they intentionally use your library incorrectly.
Exceptions on the other hand can be easily overlooked