aboutsummaryrefslogtreecommitdiff
path: root/src/plugger.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugger.h')
-rw-r--r--src/plugger.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugger.h b/src/plugger.h
index b531fae..ee7594a 100644
--- a/src/plugger.h
+++ b/src/plugger.h
@@ -6,6 +6,7 @@
6#include "hashfunctionstring.h" 6#include "hashfunctionstring.h"
7#include "hashfunctionint.h" 7#include "hashfunctionint.h"
8#include "dlfcn.h" 8#include "dlfcn.h"
9#include "exceptions.h"
9 10
10typedef struct PluginInfo 11typedef struct PluginInfo
11{ 12{
@@ -130,14 +131,12 @@ public:
130 pReg->dlHandle = dlopen( sFName, RTLD_NOW ); 131 pReg->dlHandle = dlopen( sFName, RTLD_NOW );
131 if( pReg->dlHandle == NULL ) 132 if( pReg->dlHandle == NULL )
132 { 133 {
133 printf("***ERROR: %s\n\n", dlerror() ); 134 throw PluginException( 1, "Error on %s: %s", sFName, dlerror() );
134 exit( 105 );
135 } 135 }
136 pReg->pInfo = (PluginInfo *)dlsym( pReg->dlHandle, sPluginName ); 136 pReg->pInfo = (PluginInfo *)dlsym( pReg->dlHandle, sPluginName );
137 if( pReg->pInfo == NULL ) 137 if( pReg->pInfo == NULL )
138 { 138 {
139 printf("***ERROR: %s\n\n", dlerror() ); 139 throw PluginException( 2, "Error on %s: %s", sFName, dlerror() );
140 exit( 106 );
141 } 140 }
142 hPlugin.insert( pReg->pInfo->sID, pReg ); 141 hPlugin.insert( pReg->pInfo->sID, pReg );
143 lPlugin.insert( lPlugin.end(), pReg ); 142 lPlugin.insert( lPlugin.end(), pReg );