From e9e5da32b2e154698482b7ec6b7ab2098cd849c8 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 2 Apr 2009 14:33:55 +0000 Subject: Removed some uses of printf in libbu++, I would like to get rid of all of them some day, but I'm not in much of a rush, I just wanted to do a quick survey. Also added the Formatter::flush special stream value, so now you can do a: sio << "hello" << sio.flush; and it'll flush output immediately. I also tweaked a few things in the cachestore and cache so that they actually throw exceptions and the like instead of just printing out some garbage. --- src/cache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cache.h') diff --git a/src/cache.h b/src/cache.h index 4ae1aa8..f36c29b 100644 --- a/src/cache.h +++ b/src/cache.h @@ -165,9 +165,9 @@ namespace Bu { if( i.getValue().iRefs > 0 ) { - printf("Error? iRefs=%d for key ", i.getValue().iRefs ); - __tracer_format( i.getKey() ); - printf("!\n"); + // TODO: Throw an error in this case? iRefs != 0 for an + // object when the Cache is destroyed. + throw Bu::ExceptionBase("iRefs not zero."); } pCalc->onUnload( i.getValue().pData, -- cgit v1.2.3