|
|
@@ -16,6 +16,7 @@
|
|
|
|
|
|
package com.jfinal.render;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.io.PrintWriter;
|
|
|
import java.util.Enumeration;
|
|
|
import java.util.HashMap;
|
|
|
@@ -158,7 +159,9 @@ public class FreeMarkerRender extends Render {
|
|
|
template.process(data, writer); // Merge the data-model and the template
|
|
|
writer.flush();
|
|
|
} catch (Exception e) {
|
|
|
- close(writer);
|
|
|
+ if (e instanceof IOException) {
|
|
|
+ close(writer);
|
|
|
+ }
|
|
|
throw new RenderException(e);
|
|
|
}
|
|
|
}
|