当我编译下面的代码时,它显示错误“找不到符号变量”但是如果我在 finally 块中注释代码,我能够成功编译。
请指教。
public static int writeFile (String p_file_path, String p_data) throws Exception
{
try {
FileWriter outFile = new FileWriter(p_file_path,true);
PrintWriter out = new PrintWriter(outFile);
out.println(p_data);
} catch (Exception e) {
} finally {
out.close();
}
return SUCCESS;
}