what was the expectation here exactly? what were they expecting to find?
I find unit test type things useful for these circumstances. At least it prompts someone to formulate their expectations and hopefully stops them from writing stuff like this :)
95
u/This_Growth2898 Mar 09 '23
long way to write
20
u/Emotional_Cookie2442 Mar 09 '23
That's how you turn a
ThrowFriendlyinto justThrow11
u/metooted Mar 09 '23
What lang is this? Looks like Lua, but with brackets and pointers?
3
u/Nice_Reference5388 Mar 09 '23
Address nil is not defined
2
u/YugoReventlov Mar 10 '23
Beyond all that nil stuff, what is this "throw" thing you speak of? Errors are values, man...
118
u/josephblade Mar 09 '23
Lol I love the optimism.
the address that was not provided was : ...
what was the expectation here exactly? what were they expecting to find?
I find unit test type things useful for these circumstances. At least it prompts someone to formulate their expectations and hopefully stops them from writing stuff like this :)
40
u/paulstelian97 Mar 09 '23
What's funny is that you'd get the null pointer exception before the throwFriendly
18
u/taojoannes Mar 09 '23
That's fucking beautiful.
17
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Mar 09 '23
Image Transcription: Code
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
8
u/[deleted] Mar 09 '23
i'm glad they returned the address just in case this time nil was different than the last time i looked at it
2
u/Melodic_Afternoon716 Mar 09 '23
🤣