3 ms·
The problem with catching an NPE is that you don't know what was null, so you can't know if it was expected or not. Was req null? Or was the NPE thrown from ins
by NateDad 14y ago
The problem with catching an NPE is that you don't know what was null, so you can't know if it was expected or not. Was req null? Or was the NPE thrown from inside GetHeaders()? Or something else entirely?
- prawks 14y agoRight, but in the provided example what was null doesn't seem to matter. Only that there was a null reference.