【发布时间】:2016-10-13 09:34:08
【问题描述】:
public void createDirectory(String path) {
try {
shellSupport.executeCommand("hadoop fs -mkdir "+path);
logger.info("Directory "+path+" created successfully");
} catch(Exception exc) {
throw exc;
}
}
错误
错误:未报告的异常Exception;必须被抓住或宣布 被扔掉
如果我删除 try catch 然后代码编译并且记录器显示消息但没有创建目录。
【问题讨论】:
-
你实际导入了什么
Exception类? -
java.lang.Exception
标签: java hadoop exception exception-handling