* Be more precise when throwing exception in popStringBuffer().

This commit is contained in:
hns 2005-09-13 10:22:53 +00:00
parent c57877dfb8
commit e05d4eabc8

View file

@ -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");
}