40 ms·
> Does a program which dereferences null do anything useful, all on its own? No. Yes it does. It produces an exception, which contains a stack trace. I've ac
by AnimalMuppet 10y ago
> Does a program which dereferences null do anything useful, all on its own? No.
Yes it does. It produces an exception, which contains a stack trace. I've actually used that, when I had a program that was reaching some code, and I couldn't figure out what the path it took to get there. It was easier to create an exception, catch it, and print the stack trace than to fire up a debugger and set a breakpoint.