@@ -26,10 +26,11 @@ #import "OFPlugin.h" #import "OFString.h" #import "OFLocalization.h" #import "OFInitializationFailedException.h" +#import "OFOpenItemFailedException.h" typedef OFPlugin *(*init_plugin_t)(void); of_plugin_handle_t of_dlopen(OFString *path, int flags) @@ -74,12 +75,13 @@ OFPlugin *plugin; path = [path stringByAppendingString: @PLUGIN_SUFFIX]; if ((handle = of_dlopen(path, OF_RTLD_LAZY)) == NULL) - @throw [OFInitializationFailedException - exceptionWithClass: self]; + @throw [OFOpenItemFailedException exceptionWithPath: path + mode: nil + errNo: 0]; objc_autoreleasePoolPop(pool); initPlugin = (init_plugin_t)(uintptr_t)of_dlsym(handle, "init_plugin"); if (initPlugin == (init_plugin_t)0 || (plugin = initPlugin()) == nil) { @@ -95,15 +97,16 @@ - init { if (object_getClass(self) == [OFPlugin class]) { @try { [self doesNotRecognizeSelector: _cmd]; - abort(); } @catch (id e) { [self release]; @throw e; } + + abort(); } return [super init]; }