ScriptCallDepthException Class
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
The exception thrown when the number of session state objects of a specific type and in a specific scope exceeds the configured maximum number allowed.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
System.Management.Automation Namespace
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
[SerializableAttribute] public class ScriptCallDepthException : SystemException, IContainsErrorRecord
/** @attribute SerializableAttribute() */ public class ScriptCallDepthException extends SystemException implements IContainsErrorRecord
Scopes can be created by script expressions or when one Windows PowerShell command or script calls another, which in turn may cause a stack overflow for deeply-recursive scripts. Windows PowerShell enforces a maximum call depth to prevent stack overflows. The maximum call depth is configurable, but generally high enough that scripts that are not deeply recursive should not have a problem.
System.Object
System.Exception
System.SystemException
System.Management.Automation.ScriptCallDepthException
System.Exception
System.SystemException
System.Management.Automation.ScriptCallDepthException
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Target Platforms
Windows Developer Preview, Windows Server Developer PreviewReference
ScriptCallDepthException MembersSystem.Management.Automation Namespace
Other Resources
Windows PowerShell SDKSend comments about this topic to Microsoft.