From: stephan b. <sg...@us...> - 2004-12-24 23:05:43
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7914/include/pclasses/Plugin Modified Files: Plugin.h Log Message: Fixed a compile error. Added some debuggering code. Appears to basically work. :) Index: Plugin.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Plugin/Plugin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Plugin.h 24 Dec 2004 19:15:24 -0000 1.1 +++ Plugin.h 24 Dec 2004 23:05:33 -0000 1.2 @@ -10,6 +10,10 @@ #include "pclasses/System/PathFinder.h" #include "pclasses/System/Directory.h" +#ifndef CERR +#define CERR std::cerr << __FILE__ << ":" << std::dec << __LINE__ << " : " +#endif + namespace P { namespace Plugin { @@ -113,6 +117,7 @@ */ void addPluginDir( const std::string & dir ) throw(::P::RuntimeError) { + //CERR << "addPluginDir("<<dir<<").\n"; using ::P::System::Directory; const Directory d(dir); // throws on error d.begin(); // avoid 'unused var' warning. @@ -139,12 +144,14 @@ ::P::System::SharedLib * addPlugin( const std::string & so_name ) throw(::P::RuntimeError) { + //CERR << "addPlugin("<<so_name<<").\n"; std::string fn = this->searchPath().find( so_name ); - if( ! fn ) + if( fn.empty() ) { - throw ::P::SystemError( std::string("No plugin found for '")+so_name+"'.", P_SOURCEINFO ); + throw ::P::System::SystemError( 0, (std::string("No plugin found for '")+so_name+"'.").c_str(), P_SOURCEINFO ); } ::P::System::SharedLib * shl = ::P::System::openSharedLib( fn ); + //CERR << "Opened fn="<<fn<<"\n"; this->m_holder.container().push_back( shl ); return shl; } |