In Java, the throws keyword allows for a method to declare that it will not handle an exception on its own, but rather throw it to the calling method.
Is there a sim
For those wondering, you do not even need to define what you catch to pass it on to the next method. In case you want all your error handling in one main thread you can just catch everything and pass it on like so:
try {
//your code here
}
catch {
//this will throw any exceptions caught by this try/catch
throw;
}