+
+int configcache::readConfigToMem(char *tmpConfig)
+{
+ int readturn = -1;
+
+ try { readturn = boost::iostreams::read(*inBuffer, tmpConfig, configSize); }
+ catch(boost::iostreams::bzip2_error& error) {
+ if(out) *out->log << "CCACHE: Caught bzip2 exception with error code: " << error.error() << endl << flush;
+ inFile.close();
+ }
+ catch (std::exception const& ex) {
+ if(out) *out->log << "CCACHE: Caught exception: " << ex.what() << endl << flush;
+ inFile.close();
+ }
+ catch( ... ) {
+ if(out) *out->log << "CCACHE: Caught unknown exception while reading." << endl << flush;
+ inFile.close();
+ }
+
+ return readturn;
+}