From: <mg...@us...> - 2008-09-30 12:38:52
|
Revision: 31319 http://crystal.svn.sourceforge.net/crystal/?rev=31319&view=rev Author: mgist Date: 2008-09-30 12:38:40 +0000 (Tue, 30 Sep 2008) Log Message: ----------- - Added some error prints and corrected two returns. Modified Paths: -------------- CS/trunk/plugins/csparser/csthreadedloader.cpp Modified: CS/trunk/plugins/csparser/csthreadedloader.cpp =================================================================== --- CS/trunk/plugins/csparser/csthreadedloader.cpp 2008-09-29 21:41:58 UTC (rev 31318) +++ CS/trunk/plugins/csparser/csthreadedloader.cpp 2008-09-30 12:38:40 UTC (rev 31319) @@ -105,12 +105,14 @@ threadman = csQueryRegistry<iThreadManager>(object_reg); if(!threadman.IsValid()) { + ReportError("crystalspace.level.threadedloader", "Failed to find the thread manager!"); return false; } Engine = csQueryRegistry<iEngine>(object_reg); if(!Engine.IsValid()) { + ReportError("crystalspace.level.threadedloader", "Failed to find the engine plugin!"); return false; } @@ -130,6 +132,7 @@ vfs = csQueryRegistry<iVFS>(object_reg); if(!vfs.IsValid()) { + ReportError("crystalspace.level.threadedloader", "Failed to find VFS!"); return false; } @@ -150,12 +153,14 @@ ImageLoader = csQueryRegistry<iImageIO> (object_reg); if(!ImageLoader) { + ReportError("crystalspace.level.threadedloader", "Failed to find an image loader!"); return false; } g3d = csQueryRegistry<iGraphics3D> (object_reg); if(!g3d) { + ReportError("crystalspace.level.threadedloader", "Failed to find iGraphics3D!"); return false; } @@ -483,7 +488,7 @@ bool success = LoadLibrary (ldr_context, lib_node, ssource, missingdata, threadReturns); // Wait for all jobs to finish. - return threadman->Wait(threadReturns); + return success && threadman->Wait(threadReturns); } THREADED_CALLABLE_IMPL6(csThreadedLoader, LoadFile, const char* fname, @@ -957,7 +962,7 @@ } // Wait for all jobs to finish. - return threadman->Wait(threadReturns); + return result && threadman->Wait(threadReturns); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |