ScriptCallDepthException Class

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.dll)

'Usage
Dim instance As ScriptCallDepthException

[SerializableAttribute] 
public class ScriptCallDepthException : SystemException, IContainsErrorRecord
/** @attribute SerializableAttribute() */ 
public class ScriptCallDepthException extends SystemException implements IContainsErrorRecord
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

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 Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft