Hacker News new | past | comments | ask | show | jobs | submit login

English isn't my native language but I read that as "in case it throws this type of exception" so "case throws" makes perfect sense to me.



But the throws keyword means "this can throw", it's not used to actually handle exceptions at all. Exception handling always uses catch. I think breaking that pattern would be a terrible idea, even if you can make sense if it with English grammar


Make it "case threw" then lol. But then this isn't the first time a keyword in Java means different things in different contexts. Like "final", which means that a field or variable can't be modified but on a class it means it can't be extended and on a method that it can't be overridden.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: