The nice thing about the
noexcept
is it can catch exceptions from thecatch
clause too, so it would be good if it could be used.
Yeah, but my point is that it's not really a solution, as it'll abort Geany altogether, not just the plugin. So a well-behaved plugin should manage it anyway. Maybe do:
extern "C" G_MODULE_EXPORT void geany_load_module (GeanyPlugin *plugin)
{
try {
plugin->info->name = "great plugin";
plugin->info->description = "saves the world";
plugin->info->version = "42";
plugin->info->author = "Me";
plugin->funcs->init = great_plugin_init;
plugin->funcs->cleanup = great_plugin_cleanup;
GEANY_PLUGIN_REGISTER (plugin, 225);
} catch(...) {
// not much to be done, and mustn't throw exceptions
g_critical("My great plugin failed to register itself. Maybe it's not so great after all...");
}
}
I wouldn't think it would change the ABI […]
It has not to change the ABI of the C decl, as the C caller won't know about it so won't do anything in either case. It still has to be able to call the function just the same.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.