From 7cf9960ecf835d69a95249dfaa4017e408d93eb5 Mon Sep 17 00:00:00 2001 From: mdb Date: Wed, 14 Jan 2004 09:10:05 +0000 Subject: [PATCH] Always log the error and catch Throwable to make sure we log everything. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1369 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../java/com/samskivert/velocity/ImportDirective.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/velocity/ImportDirective.java b/projects/samskivert/src/java/com/samskivert/velocity/ImportDirective.java index e8f82b43..3dc3ee34 100644 --- a/projects/samskivert/src/java/com/samskivert/velocity/ImportDirective.java +++ b/projects/samskivert/src/java/com/samskivert/velocity/ImportDirective.java @@ -1,5 +1,5 @@ // -// $Id: ImportDirective.java,v 1.1 2001/11/06 04:49:32 mdb Exp $ +// $Id: ImportDirective.java,v 1.2 2004/01/14 09:10:05 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -153,12 +153,12 @@ public class ImportDirective extends Directive context.pushCurrentTemplateName(path); ((SimpleNode)t.getData()).render(context, writer); - } catch (Exception e) { + } catch (Throwable th) { + rsvc.error("Exception rendering #import(" + path + "): " + th); // we want to pass method invocation exceptions through - if (e instanceof MethodInvocationException) { - throw (MethodInvocationException)e; + if (th instanceof MethodInvocationException) { + throw (MethodInvocationException)th; } - rsvc.error("Exception rendering #import(" + path + "): " + e); return false; } finally {