diff --git a/Assets/Fungus/Scripts/Components/Block.cs b/Assets/Fungus/Scripts/Components/Block.cs index f727cf09..1be1f33b 100644 --- a/Assets/Fungus/Scripts/Components/Block.cs +++ b/Assets/Fungus/Scripts/Components/Block.cs @@ -312,7 +312,20 @@ namespace Fungus // set it here in case a command starts and finishes execution before the next window update. command.ExecutingIconTimer = Time.realtimeSinceStartup + FungusConstants.ExecutingIconFadeTime; BlockSignals.DoCommandExecute(this, command, i, commandList.Count); + +#if UNITY_EDITOR + try + { + command.Execute(); + } + catch (Exception) + { + Debug.LogError("Rethrowing Exception thrown by:" + command.GetLocationIdentifier()); + throw; + } +#else command.Execute(); +#endif // Wait until the executing command sets another command to jump to via Command.Continue() while (jumpToCommandIndex == -1)