From c2605e72b66f396d7638f6277acaf71fb0221c4c Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 23 Aug 2001 14:02:12 +0000 Subject: [PATCH] Catch every Throwable in update methods, since FESI may throw Errors at us --- src/helma/framework/core/Action.java | 2 +- src/helma/framework/core/FunctionFile.java | 2 +- src/helma/framework/core/Template.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helma/framework/core/Action.java b/src/helma/framework/core/Action.java index 3bc176e8..a36ca68a 100644 --- a/src/helma/framework/core/Action.java +++ b/src/helma/framework/core/Action.java @@ -69,7 +69,7 @@ public class Action implements Updatable { reader.close (); String content = new String (cbuf); update (content); - } catch (Exception filex) { + } catch (Throwable filex) { app.logEvent ("*** Error reading action file "+file+": "+filex); } diff --git a/src/helma/framework/core/FunctionFile.java b/src/helma/framework/core/FunctionFile.java index 392cb634..a7a1ef5d 100644 --- a/src/helma/framework/core/FunctionFile.java +++ b/src/helma/framework/core/FunctionFile.java @@ -97,7 +97,7 @@ public class FunctionFile implements Updatable { EvaluationSource es = new FileEvaluationSource(file.getPath(), null); updateRequestEvaluator (reval, fr, es); - } catch (Exception ignore) {} + } catch (Throwable ignore) {} } } diff --git a/src/helma/framework/core/Template.java b/src/helma/framework/core/Template.java index 82d619a4..10ab1404 100644 --- a/src/helma/framework/core/Template.java +++ b/src/helma/framework/core/Template.java @@ -144,7 +144,7 @@ public class Template extends Action { pfunc = parseFunction (name, "arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10", body+"\r\nreturn null;\r\n"); - } catch (Exception x) { + } catch (Throwable x) { String message = x.getMessage (); pfunc = new ErrorFeedback (name, message); } @@ -152,7 +152,7 @@ public class Template extends Action { psfunc = parseFunction (fname, "arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10", "res.pushStringBuffer(); "+body+"\r\nreturn res.popStringBuffer();\r\n"); - } catch (Exception x) { + } catch (Throwable x) { String message = x.getMessage (); psfunc = new ErrorFeedback (fname, message); }