Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 3083e5d

Browse files
committed
Handling ValueModificationException when setting value and showing it to user.
(cherry picked from commit 831584d)
1 parent 2d8a44f commit 3083e5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
using MonoDevelop.Ide.Commands;
4242
using MonoDevelop.Ide.Editor.Extension;
4343
using System.Linq;
44+
using Mono.Debugging.Evaluation;
4445
using MonoDevelop.Ide.Fonts;
4546

4647
namespace MonoDevelop.Debugger
@@ -1488,8 +1489,11 @@ void OnValueEdited (object s, EditedArgs args)
14881489
MessageService.ShowError (GettextCatalog.GetString ("Unregognized escape sequence."));
14891490
return;
14901491
}
1491-
*/ if (val.Value != newVal)
1492+
*/
1493+
if (val.Value != newVal)
14921494
val.Value = newVal;
1495+
} catch (ValueModificationException e) {
1496+
MessageService.ShowError (e.Message);
14931497
} catch (Exception ex) {
14941498
LoggingService.LogError ("Could not set value for object '" + val.Name + "'", ex);
14951499
}

0 commit comments

Comments
 (0)