2 ms·
Null pointer exceptions are programming errors. They're usually better handled up the stack too. An item not found in a collection or tree is not an error.
by barrkel 10y ago
Null pointer exceptions are programming errors. They're usually better handled up the stack too.
An item not found in a collection or tree is not an error.
- int_19h 10y agoHow exactly do you handle a null pointer exception?
- barrkel 10y agoProgramming errors in production are usually handled by logging and then either exiting the process or going back around the request / response loop again (presuming global state hasn't been polluted, which is unusual in most modern application servers since they're usually stateless). Null pointer exceptions are little different.