196
HAlex
6y

He should make tutorials: "How to cause an exception"

Comments
  • 3
    ... Is that something he actually wrote...?
  • 9
    Maybe he doesn't know you can manually throw exceptions and is creating one intentionally? Lol
  • 9
    @Navigatr wrote, committed, and compiled, this file is 3 years old 😂😭😭
  • 0
    @hexc maybe 😂
  • 1
    I actually LoL'ed at this..
  • 4
    I can't even... 🤔

    @Lahsen2016 just breaks out of the function with no value.
  • 0
    @inferiormartin it's still a variable, if the variable is null, it will always throw a NPC exception
  • 2
    @Lahsen2016 it's a longer function, and it returns void
  • 0
    @inferiormartin ah, didn't know that, years of experience in Java and there's something new to learn, thank you!
  • 0
    @inferiormartin just wanted to point out that remove() isn't a static method, but still, thanks.
  • 1
    Also, if this was C# and that was an extension method, it will also work.
  • 0
    @juunas great to know even if I'm not into C#
  • 0
    What does return do here?😹
  • 0
    @sunfishcc it's a longer method, it should be
    if (entity == null) return;
  • 0
    Useless return?
  • 0
    @Hastouki just like what we said almost 4 times: it's a longer method, the return is used to stop the whole method
Add Comment