r/programminghumor • • 6d ago

Java

Post image
1.4k Upvotes

25 comments sorted by

View all comments

Show parent comment

38

u/NoWeHaveYesBananas 6d ago

What if you want it to throw an error, and not hide your bugs like a coward

23

u/vanteli 6d ago

you tighten your pussy like a man and assert condition != null;

19

u/Ignisami 6d ago
try {
if (condition) { /* code whatever */ }
} catch (MommaAintRaisedNoCowardException _) {
log.error("No bugs to be seen here no sirreee");
}

public class MommaAintRaisedNoCowardException  
 extends NullPointerException   
{ /* standard exception stuff */ }