We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 242d454 commit 1eeaf7fCopy full SHA for 1eeaf7f
1 file changed
src/lse/PluginManager.cpp
@@ -216,11 +216,12 @@ ll::Expected<> PluginManager::load(ll::mod::Manifest manifest) {
216
return plugin->onLoad().transform([&, this] { addMod(manifest.name, plugin); });
217
} catch (const Exception& e) {
218
if (scriptEngine) {
219
- EngineScope engineScope(scriptEngine);
220
- auto error = ll::makeStringError(
221
- "Failed to load plugin {0}: {1}\n{2}"_tr(manifest.name, e.message(), e.stacktrace())
222
- );
223
- ExitEngineScope exit;
+ auto error = [&] {
+ EngineScope engineScope(scriptEngine);
+ return ll::makeStringError(
+ "Failed to load plugin {0}: {1}\n{2}"_tr(manifest.name, e.message(), e.stacktrace())
+ );
224
+ }();
225
226
#ifndef LEGACY_SCRIPT_ENGINE_BACKEND_NODEJS
227
LLSERemoveTimeTaskData(scriptEngine);
0 commit comments