Think about it . Read the code. Ask yourself a question: for example. can this pointer never be NULL here? What happens if this method is called before initialization?
Do not make assumptions such as "this file will always be there." Test.
Think of cross cases, boundaries, negative values, overflows ...
An error is often grouped by a cluster. Look around when you find him. Also look for the same error elsewhere.
source share