You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing few more tests for the functions in myUtils.h/cc I'm wondering what is the preferred way to handle non valid input. Whether at all check for it and also how to handle if function wants to return non valid output.
Checking validity of input variables in every function might affect performance, on the other hand having no way to signal something is wrong is also not good.
I'm inclined to use exceptions if non valid value is detected, question is where and how to catch them.
The text was updated successfully, but these errors were encountered:
Writing few more tests for the functions in
myUtils.h/cc
I'm wondering what is the preferred way to handle non valid input. Whether at all check for it and also how to handle if function wants to return non valid output.Checking validity of input variables in every function might affect performance, on the other hand having no way to signal something is wrong is also not good.
I'm inclined to use exceptions if non valid value is detected, question is where and how to catch them.
The text was updated successfully, but these errors were encountered: