DicomObjects.NET.V8
DicomObjects Namespace / DicomAssociation Class / ThrowStatusException Property



In This Topic
    ThrowStatusException Property
    In This Topic
    Controls whether an exception is generated when a non-zero status is received.
    Syntax
    'Declaration
     
    Public Property ThrowStatusException As Boolean
    'Usage
     
    Dim instance As DicomAssociation
    Dim value As Boolean
     
    instance.ThrowStatusException = value
     
    value = instance.ThrowStatusException
    public bool ThrowStatusException {get; set;}
    public:
    property bool ThrowStatusException {
       bool get();
       void set (    bool value);
    }
    Remarks
    Previous versions of DicomObjects have always simply returned the status of an operation, leaving the developer to check the value (as well as catching any exceptions which can occur due to protocol violations etc.) if however this property is set to true (directly, or by setting DefaultThrowStatusException to true before creating the DicomAssociation), then an error status will cause an exception to the thrown. Where present, the values in the 0000,0901 (offending attributes) and 0000,0902 (error comment) will be included in the exception text, to provide more useful information.
    Requirements

    Target Platforms: .NET CLR 4.0 or higher

    See Also