From 3154a4b9108c50d0214166a251d7ff690543ea1a Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 6 Nov 2020 14:37:47 +0000 Subject: [PATCH] Updated some blueprint error handling --- .../patch/helper_classes/soul_patch_Blueprint.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/soul/patch/helper_classes/soul_patch_Blueprint.h b/include/soul/patch/helper_classes/soul_patch_Blueprint.h index b46c2e24..eea63249 100644 --- a/include/soul/patch/helper_classes/soul_patch_Blueprint.h +++ b/include/soul/patch/helper_classes/soul_patch_Blueprint.h @@ -68,9 +68,21 @@ struct BlueprintEditorComponent : public juce::AudioProcessorEditor, reactRootComponent.evaluate (fileToLoad); reactRootComponent.enableHotReloading(); } - catch (const blueprint::EcmascriptEngine::Error&) + catch (const blueprint::EcmascriptEngine::Error& e) { failedToLoad = true; + std::cerr << e.context << std::endl + << e.stack << std::endl; + } + catch (const std::logic_error& e) + { + failedToLoad = true; + std::cerr << e.what() << std::endl; + } + catch (...) + { + failedToLoad = true; + jassertfalse; // maybe need to add handling for some other kind of error? } }