Where the rubber meets the debugging road.
This chapter covers the art of catching bugs in your code.
Try these exercises to hone your bug-catching skills:
| Code: | if (bug == null) { throw new Exception("Bug found!"); } |
| Description: | This code checks for bugs by checking if the bug variable is null. |
| Problem: | A user reports a crash on a critical system. |
| Solution: | Use a debugger to step through the code and identify the bug. |
Catching bugs is an art and a science. Practice it well.