RecursionDiscardedException.cs 675 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using Jint.Native;
  5. using Jint.Parser.Ast;
  6. namespace Jint.Runtime
  7. {
  8. using Jint.Runtime.CallStack;
  9. public class RecursionDiscardedException : Exception
  10. {
  11. public string CallChain { get; private set; }
  12. public string CallExpressionReference { get; private set; }
  13. public RecursionDiscardedException(JintCallStack currentStack, string currentExpressionReference)
  14. : base("The recursion is forbidden by script host.")
  15. {
  16. CallExpressionReference = currentExpressionReference;
  17. CallChain = currentStack.ToString();
  18. }
  19. }
  20. }