|
@@ -1,15 +0,0 @@
|
|
|
-package com.mrxu.framework.boot.handle;
|
|
|
|
|
-
|
|
|
|
|
-import com.mrxu.framework.boot.entity.BusinessException;
|
|
|
|
|
-import freemarker.core.Environment;
|
|
|
|
|
-import freemarker.template.TemplateException;
|
|
|
|
|
-import freemarker.template.TemplateExceptionHandler;
|
|
|
|
|
-
|
|
|
|
|
-import java.io.Writer;
|
|
|
|
|
-
|
|
|
|
|
-public class FreemarkerExceptionHandler implements TemplateExceptionHandler {
|
|
|
|
|
- @Override
|
|
|
|
|
- public void handleTemplateException(TemplateException te, Environment env, Writer out) throws TemplateException {
|
|
|
|
|
- throw new BusinessException("模板解析错误");
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|