4 ms·
Errors should almost always be logged, that way it's easier for you to diagnose errors during runtime. Throwing the error is useful when callers of a function
by mahmoudhossam 4y ago
Errors should almost always be logged, that way it's easier for you to diagnose errors during runtime.
Throwing the error is useful when callers of a function need to know that error has occurred, otherwise it should be handled within the function.