OPC Studio User's Guide and Reference
FromException Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.OperationModel Namespace > OperationResult Class : FromException Method
Information about the reason of the failure of the operation.
For a given exception, returns a successful or failed operation result.
Syntax
'Declaration
 
<NotNullAttribute()>
Public Shared Function FromException( _
   ByVal exception As Exception _
) As OperationResult
'Usage
 
Dim exception As Exception
Dim value As OperationResult
 
value = OperationResult.FromException(exception)
[NotNull()]
public static OperationResult FromException( 
   Exception exception
)
[NotNull()]
public:
static OperationResult^ FromException( 
   Exception^ exception
) 

Parameters

exception
Information about the reason of the failure of the operation.

Return Value

The successful operation result when exception is null; the failed operation result otherwise.
Remarks

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also