summaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-04-02 14:33:55 +0000
committerMike Buland <eichlan@xagasoft.com>2009-04-02 14:33:55 +0000
commite9e5da32b2e154698482b7ec6b7ab2098cd849c8 (patch)
tree1e9d2168a27b3979398285909dd10c362c03545a /src/cache.h
parentb4ab27db8a97f0a56a61bd56480cfbe08a1f3399 (diff)
downloadlibbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.tar.gz
libbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.tar.bz2
libbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.tar.xz
libbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.zip
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.
Diffstat (limited to 'src/cache.h')
-rw-r--r--src/cache.h6
1 files changed, 3 insertions, 3 deletions
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
165 { 165 {
166 if( i.getValue().iRefs > 0 ) 166 if( i.getValue().iRefs > 0 )
167 { 167 {
168 printf("Error? iRefs=%d for key ", i.getValue().iRefs ); 168 // TODO: Throw an error in this case? iRefs != 0 for an
169 __tracer_format( i.getKey() ); 169 // object when the Cache is destroyed.
170 printf("!\n"); 170 throw Bu::ExceptionBase("iRefs not zero.");
171 } 171 }
172 pCalc->onUnload( 172 pCalc->onUnload(
173 i.getValue().pData, 173 i.getValue().pData,