Commit 47ca6b81 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

catch GemException& rather than GemException

parent 479f36eb
......@@ -50,7 +50,7 @@ void GemException::report(const char*origin) const throw() {
void gem::catchGemException(const char*name, const t_object*obj) {
try {
throw;
} catch (GemException &ex) {
} catch (GemException&ex) {
if(NULL==obj) {
ex.report(name);
} else {
......
......@@ -260,7 +260,7 @@ bool pix_film :: addHandle( std::vector<std::string>available, std::string ID)
gem::plugins::film*handle=NULL;
try {
handle=gem::PluginFactory<gem::plugins::film>::getInstance(key);
} catch(GemException x) {
} catch(GemException&x) {
handle=NULL;
verbose(1, "cannot use film plugin '%s': %s", key.c_str(), x.what());
}
......
......@@ -954,7 +954,7 @@ static void*freeframe_loader_new(t_symbol*s, int argc, t_atom*argv) {
CPPExtern::m_holder = NULL;
CPPExtern::m_holdname=NULL;
return(obj);
} catch (GemException e) {
} catch (GemException&e) {
::verbose(2, "freeframe_loader: failed!");
//e.report();
return NULL;
......
......@@ -502,7 +502,7 @@ static void*frei0r_loader_new(t_symbol*s, int argc, t_atom*argv) {
CPPExtern::m_holder = NULL;
CPPExtern::m_holdname=NULL;
return(obj);
} catch (GemException e) {
} catch (GemException&e) {
::verbose(2, "frei0r_loader: failed!");
//e.report();
return NULL;
......@@ -516,7 +516,7 @@ bool pix_frei0r :: loader(t_canvas*canvas, std::string classname) {
pix_frei0r::F0RPlugin*plugin=NULL;
try {
plugin=new F0RPlugin(pluginname, canvas);
} catch (GemException e) {
} catch (GemException&e) {
::verbose(2, "frei0r_loader: failed!!");
// e.report();
return false;
......
......@@ -178,7 +178,7 @@ bool pix_record :: addHandle( std::vector<std::string>available, std::string ID)
startpost("backend #%d='%s'\t", m_allhandles.size(), key.c_str());
try {
handle=gem::PluginFactory<gem::plugins::record>::getInstance(key);
} catch (GemException ex) {
} catch (GemException&ex) {
startpost("(%s) ", ex.what());
handle=NULL;
}
......
......@@ -170,7 +170,7 @@ bool pix_video :: addHandle( std::vector<std::string>available, std::string ID)
startpost("backend #%d='%s'\t", m_videoHandles.size(), key.c_str());
try {
handle=gem::PluginFactory<gem::plugins::video>::getInstance(key);
} catch (GemException ex) {
} catch (GemException&ex) {
}
if(NULL==handle) {
post("<--- DISABLED");
......
......@@ -67,7 +67,7 @@ int gem::BasePluginFactory::doLoadPlugins(std::string basename, std::string path
dll=NULL;
try {
dll=new GemDylib(f, "");
} catch (GemException x) {
} catch (GemException&x) {
// oops, on w32 this might simply be because getFilenameListing() stripped the path
// so let's try again, with Path added...
if(f.find(path) == f.npos) {
......@@ -75,7 +75,7 @@ int gem::BasePluginFactory::doLoadPlugins(std::string basename, std::string path
std::string f1=path;
f1+=f;
dll=new GemDylib(f1, "");
} catch (GemException x1) {
} catch (GemException&x1) {
// giving up
std::cerr << "library loading returned: " << x1.what() << std::endl;
dll=NULL;
......@@ -89,7 +89,7 @@ int gem::BasePluginFactory::doLoadPlugins(std::string basename, std::string path
try {
m_pimpl->p_loaded.push_back(f);
count++;
} catch (GemException x) {
} catch (GemException&x) {
std::cerr << "plugin loading returned: " << x.what() << std::endl;
}
}
......
......@@ -83,7 +83,7 @@ namespace gem { namespace plugins {
gem::plugins::imageloader*loader=NULL;
try {
loader=gem::PluginFactory<gem::plugins::imageloader>::getInstance(key);
} catch(GemException x) {
} catch(GemException&x) {
loader=NULL;
verbose(1, "cannot use image loader plugin '%s': %s", key.c_str(), x.what());
}
......
......@@ -214,7 +214,7 @@ namespace gem { namespace plugins {
imagesaver*saver=NULL;
try {
saver=gem::PluginFactory<imagesaver>::getInstance(key);
} catch(GemException x) {
} catch(GemException&x) {
saver=NULL;
verbose(1, "cannot use image loader plugin '%s': %s", key.c_str(), x.what());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment