diff options
author | Marius Ungureanu <therzok@gmail.com> | 2020-04-22 19:16:55 +0300 |
---|---|---|
committer | Marius Ungureanu <therzok@gmail.com> | 2020-04-22 19:18:02 +0300 |
commit | 6c2fc66e63bc09ed7cb4f749a1f204fdceb246b1 (patch) | |
tree | 008451d86732771a148d37cb46eb75e006a6f0b2 | |
parent | d1eb43e66b470fa6afc8823a26dbdef815f4fd2a (diff) |
Add more logging for conditions not found
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/738212
-rw-r--r-- | Mono.Addins/Mono.Addins/ConditionType.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Mono.Addins/Mono.Addins/ConditionType.cs b/Mono.Addins/Mono.Addins/ConditionType.cs index 7af2884..4f7b0db 100644 --- a/Mono.Addins/Mono.Addins/ConditionType.cs +++ b/Mono.Addins/Mono.Addins/ConditionType.cs @@ -215,8 +215,10 @@ namespace Mono.Addins } ConditionType type = ctx.GetCondition (typeId); + if (type == null) { - addinEngine.ReportError ("Condition '" + typeId + "' not found in current extension context.", null, null, false); + var parts = string.Join(", ", Array.ConvertAll(node.Attributes, attr => attr.Name + "=" + attr.Value)); + addinEngine.ReportError ("Condition '" + typeId + "' not found in current extension context. [" + parts + "]", node.ParentAddinDescription.AddinId, null, false); return false; } @@ -224,7 +226,7 @@ namespace Mono.Addins return type.Evaluate (node); } catch (Exception ex) { - addinEngine.ReportError ("Error while evaluating condition '" + typeId + "'", null, ex, false); + addinEngine.ReportError ("Error while evaluating condition '" + typeId + "'", node.ParentAddinDescription.AddinId, ex, false); return false; } } |