safe guard against expressions like x = 2*sin(bas)+5*

This commit is contained in:
carm
2012-11-13 23:26:35 -05:00
parent c4d44203de
commit 936ebd4751
6 changed files with 57 additions and 65 deletions

View File

@ -84,12 +84,14 @@ std::auto_ptr<Preset> PresetFactoryManager::allocate(const std::string & url, co
const std::string extension = parseExtension (url);
return factory(extension).allocate(url, name);
} catch (const PresetFactoryException & e) {
throw e;
} catch (const std::exception & e) {
throw PresetFactoryException(e.what());
} catch (...) {
throw PresetFactoryException("uncaught preset factory exception");
}
return std::auto_ptr<Preset>();
}
PresetFactory & PresetFactoryManager::factory(const std::string & extension) {