Commit 333ac78b authored by R10's avatar R10

加载文件异常抛出

parent 5eca5899
package cn.com.poc.common.utils; package cn.com.poc.common.utils;
import cn.com.yict.framemax.core.exception.BusinessException;
import cn.com.yict.framemax.core.i18n.I18nMessageException; import cn.com.yict.framemax.core.i18n.I18nMessageException;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
...@@ -192,10 +193,10 @@ public class DocumentLoad { ...@@ -192,10 +193,10 @@ public class DocumentLoad {
case "csv": case "csv":
return excelToMarkdown(file); return excelToMarkdown(file);
default: default:
throw new I18nMessageException(type + " format is not yet supported"); throw new BusinessException(type + " format is not yet supported");
} }
} catch (IOException e) { } catch (IOException e) {
throw new I18nMessageException(e.getMessage()); throw new BusinessException(e.getMessage());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment