RuntimeException Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
RuntimeException is the base class for exceptions likely to occur while a PowerShell command is running.
public ref class RuntimeException : SystemException, System::Management::Automation::IContainsErrorRecord
[System.Serializable]
public class RuntimeException : SystemException, System.Management.Automation.IContainsErrorRecord
public class RuntimeException : SystemException, System.Management.Automation.IContainsErrorRecord
[<System.Serializable>]
type RuntimeException = class
inherit SystemException
interface IContainsErrorRecord
type RuntimeException = class
inherit SystemException
interface IContainsErrorRecord
Public Class RuntimeException
Inherits SystemException
Implements IContainsErrorRecord
- Inheritance
-
RuntimeException
- Derived
- Attributes
- Implements
Remarks
PowerShell scripts can trap RuntimeException using the "trap (exceptionclass) {handler}" script construct.
Instances of this exception class are usually generated by the PowerShell Engine. It is unusual for code outside the PowerShell Engine to create an instance of this class.
Constructors
RuntimeException() |
Initializes a new instance of the RuntimeException class. |
RuntimeException(SerializationInfo, StreamingContext) |
Obsolete.
Initializes a new instance of the RuntimeException class using data serialized via ISerializable |
RuntimeException(String) |
Initializes a new instance of the RuntimeException class. |
RuntimeException(String, Exception) |
Initializes a new instance of the RuntimeException class. |
RuntimeException(String, Exception, ErrorRecord) |
Initializes a new instance of the RuntimeException class starting with an already populated error record. |
Properties
ErrorRecord |
Additional information about the error. |
WasThrownFromThrowStatement |
Methods
GetObjectData(SerializationInfo, StreamingContext) |
Serializer for ISerializable |