r/programminghumor • • 7d ago

Java

Post image
1.4k Upvotes

27 comments sorted by

View all comments

Show parent comment

39

u/NoWeHaveYesBananas 7d ago

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

23

u/vanteli 7d ago

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

20

u/Ignisami 7d 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 */ }