DicomObjects.NetStandard Documentation
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: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also