Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/FtpFileManagerImpl.java =================================================================== diff -u -r29973 -r30430 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/FtpFileManagerImpl.java (.../FtpFileManagerImpl.java) (revision 29973) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/FtpFileManagerImpl.java (.../FtpFileManagerImpl.java) (revision 30430) @@ -51,7 +51,8 @@ file = list[0]; } } catch (Exception e) { - throw new IOException("获取文件"+ fileName +"失败"); + e.printStackTrace(); + throw new IOException("获取文件"+ fileName +"失败:" + e.getMessage()); } return file; } @@ -88,7 +89,7 @@ } } } catch (IOException e) { - throw new IOException("从"+ new String(sourceRoute.getBytes("iso-8859-1"),"UTF-8") +"复制文件"+ fileName +"发生异常"); + throw new IOException("从"+ new String(sourceRoute.getBytes("iso-8859-1"),"UTF-8") +"复制文件"+ fileName +"发生异常:" + e.getMessage()); }finally{ if(out != null){ out.close(); @@ -133,7 +134,7 @@ } } } catch (Exception e) { - throw new IOException("获取当前绝对路径失败"); + throw new IOException("获取当前绝对路径失败:"+e.getMessage()); } return path; } @@ -153,12 +154,12 @@ e2.printStackTrace(); if(StringUtils.isBlank(path)){ try { - throw new RuntimeException("查看"+ getCurrentPath(ftp) +"目录下的文件异常"); + throw new RuntimeException("查看"+ getCurrentPath(ftp) +"目录下的文件异常"+ e2.getMessage()); } catch (IOException e) { throw new RuntimeException(e.getMessage()); } }else{ - throw new RuntimeException("查看"+ path +"目录下的文件异常"); + throw new RuntimeException("查看"+ path +"目录下的文件异常"+ e2.getMessage()); } } catch (Exception e){ e.printStackTrace(); @@ -175,7 +176,7 @@ ftp.retrieveFile(new String(fileName.getBytes("UTF-8"),"ISO-8859-1"), fos); inputStream = new ByteArrayInputStream(fos.toByteArray()); } catch (Exception e) { - throw new RuntimeException("获取inputStream异常"); + throw new RuntimeException("获取inputStream异常" + e.getMessage()); } return inputStream; } @@ -204,7 +205,7 @@ } ftp.makeDirectory(path); } catch (Exception e) { - throw new RuntimeException("创建文件异常,path:" + path); + throw new RuntimeException("创建文件异常,path:" + path + ","+ e.getMessage()); } } /** @@ -249,10 +250,10 @@ } } catch (SocketException e) { e.printStackTrace(); - throw new RuntimeException("连接异常,ip:"+ip+",port:"+port+",用户名:"+userName); + throw new RuntimeException("连接异常,ip:"+ip+",port:"+port+",用户名:"+userName + e.getMessage()); } catch (IOException e) { e.printStackTrace(); - throw new RuntimeException("FTP的端口错误,请正确配置。ip:"+ip+",port:"+port+",用户名:"+userName); + throw new RuntimeException("FTP的端口错误,请正确配置。ip:"+ip+",port:"+port+",用户名:"+userName + e.getMessage()); } catch (Exception e) { throw new RuntimeException(e.getMessage()); } Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/SmbFileManagerImpl.java =================================================================== diff -u -r27115 -r30430 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/SmbFileManagerImpl.java (.../SmbFileManagerImpl.java) (revision 27115) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/SmbFileManagerImpl.java (.../SmbFileManagerImpl.java) (revision 30430) @@ -14,7 +14,8 @@ try { inputStream = smbFile.getInputStream(); } catch (Exception e) { - throw new RuntimeException("获取inputStream异常"); + e.printStackTrace(); + throw new RuntimeException("获取inputStream异常"+ e.getMessage()); } return inputStream; } @@ -29,7 +30,8 @@ session.mkdir(path); } } catch (Exception e) { - throw new RuntimeException("创建文件异常,path:" + path); + e.printStackTrace(); + throw new RuntimeException("创建文件异常,path:" + path +","+ e.getMessage()); } } public boolean moveSmbFile(SmbSession session, SmbFile smbForm, String targetRoute){ @@ -41,7 +43,7 @@ flag = true; }catch(Exception e){ e.printStackTrace(); - throw new RuntimeException(smbForm.getName()+"文件在移动和删除过程中发生错误"); + throw new RuntimeException(smbForm.getName()+"文件在移动和删除过程中发生错误:"+e.getMessage()); } return flag; }