Exceptions and TDD

Channel:
Subscribers:
2,710
Published on ● Video Link: https://www.youtube.com/watch?v=GWys7Wk40J8



Duration: 54:47
104 views
2


Exceptions are a way to:
1) Return from a function that you wouldn't otherwise be able to return a value for and
2) A way to clean up the control code of your functions so that it's both readable and handling errors correctly

TDD (we showed off GTest today) is a way to:
1) Write tests to show that your functions are correct
2) Think about your code so that you don't get trapped into just thinking about correct cases, but also edge cases and outright bad input as well, so that your code becomes bulletproof.