From 645abc5ab1075c6ac887765308bc884d4869ebde Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Thu, 24 Oct 2013 18:46:58 +0200 Subject: [PATCH] Improved diagnostic message in case of a circular definition. --- Source/Bind/Structures/Constant.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Bind/Structures/Constant.cs b/Source/Bind/Structures/Constant.cs index 77f2f34a..13d98425 100644 --- a/Source/Bind/Structures/Constant.cs +++ b/Source/Bind/Structures/Constant.cs @@ -205,7 +205,9 @@ namespace Bind.Structures throw new ArgumentNullException("enums"); if (++CurrentReferenceDepth >= MaxReferenceDepth) - throw new InvalidOperationException("Enum specification contains cycle"); + throw new InvalidOperationException(String.Format( + "Enum specification contains cycle: {0}", + c.ToString())); if (!String.IsNullOrEmpty(c.Reference)) {