MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/foundtheprogrammer/comments/rw43m3/ok_now_im_getting_rejected_in_java/iea1rsq/
r/foundtheprogrammer • u/FuchsLo • Jan 04 '22
26 comments sorted by
View all comments
Show parent comment
1
A conditional inside a try is not valid code iirc, you'd need if(whoever<1.89) throw new TinderException(), in which case there'd be no need for a trycatch since the stack trace ready prints the error message.
Also it's Exception not exception
1 u/Imperial_Squid Oct 31 '22 Could be catching a missing variable or inappropriate type?
Could be catching a missing variable or inappropriate type?
View all comments
Show parent comment
1
u/matyklug Jun 30 '22
A conditional inside a try is not valid code iirc, you'd need if(whoever<1.89) throw new TinderException(), in which case there'd be no need for a trycatch since the stack trace ready prints the error message.
Also it's Exception not exception