From 5d9ad7276cfd9696784595314471416aba691b17 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 22 Jun 2010 01:44:15 +0200 Subject: Proper throws on the plugin subsystem. --- src/lua-plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lua-plugin.cc b/src/lua-plugin.cc index 3bc7e83..4bf7cd5 100644 --- a/src/lua-plugin.cc +++ b/src/lua-plugin.cc @@ -48,7 +48,7 @@ void LuaLoadPlugin(Handle * h, Lua * L) throw (GeneralException) { HMEMORYMODULE module; if (!(module = MemoryLoadLibrary(buffer))) - throw("Can't load library " + h->GetName() + " from memory."); + throw GeneralException("Can't load library " + h->GetName() + " from memory."); init_ptr_t init_ptr = (init_ptr_t) MemoryGetProcAddress(module, "init_plugin"); @@ -164,7 +164,7 @@ void LuaLoadPlugin(Handle * h, Lua * L) throw (GeneralException) { Base::printm(M_INFO, "Loading library " + h->GetName() + "\n"); if (!handle) - throw("Can't load library " + h->GetName() + " from memory."); + throw GeneralException("Can't load library " + h->GetName() + " from memory."); init_ptr_t init_ptr = (init_ptr_t) dlsym(handle, "init_plugin"); -- cgit v1.2.3