Improved diagnostic message in case of a circular definition.

This commit is contained in:
Stefanos A. 2013-10-24 18:46:58 +02:00
parent 780d5e60c2
commit 645abc5ab1

View file

@ -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))
{