67,513
社区成员
发帖
与我相关
我的任务
分享
void somemethod() throws SomeException {
if (some_exception_occurs_then_method_can_not_continue) {
throw new SomeException(you_must_insure_conditions_to_continue_the_method);
}
}
void somemethod() {
try {
//do something
} catch (Exception e) {
//you_can_do_something_here_to_handle_the_exception
}
}