414
Personally I prefer throw new nullpointerexception
(pawb.social)
Post funny things about programming here! (Or just rant about your favourite programming language.)
I have never used
System.exit()
orsys.exit()
. What is a use case where you would call these explicitly?For example if you want to set an explicit exit code. Calling python scripts will usually result in an exit code
0
after the script is run. If you want to set a different exit code for example1
to indicate some error occured you can do that viasys.exit(1)
.Same thing applies to other languages of course.