From e05d4eabc8d41c7b8aa961f052a0bfd94229fc87 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 13 Sep 2005 10:22:53 +0000 Subject: [PATCH] * Be more precise when throwing exception in popStringBuffer(). --- src/helma/framework/ResponseTrans.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helma/framework/ResponseTrans.java b/src/helma/framework/ResponseTrans.java index 800c383e..cdba659c 100644 --- a/src/helma/framework/ResponseTrans.java +++ b/src/helma/framework/ResponseTrans.java @@ -239,7 +239,9 @@ public final class ResponseTrans implements Serializable { * Returns the content of the current string buffer and switches back to the previos one. */ public synchronized String popStringBuffer() { - if (buffer == null || buffers == null) { + if (buffer == null) { + throw new RuntimeException("Can't pop string buffer: buffer is null"); + } else if (buffers == null) { throw new RuntimeException("Can't pop string buffer: buffer stack is empty"); }