Pinchot C# Error Handling API¶
This high level document covers the main objects, methods, and properties related to error handling when using the Pinchot C# API. Exception handling, status checking, and identifying invalid data conditions are essential.
High-Level Overview¶
The Pinchot C# API provides multiple layers of error detection and handling:
- Exceptions - Thrown for critical errors that prevent normal operation
- Status Properties and Methods - Allow checking the current state of system components
- Data Validation - Methods to verify the integrity of acquired scan data
- Connection Health - Tools to monitor and validate network connectivity
Proper error handling ensures robust applications that can gracefully handle hardware issues, network problems, and invalid configurations.
Relevant API Calls¶
Exceptions¶
VersionCompatibilityException- ScanHead is not compatible with the operation being performedArgumentException- Invalid parameter valuesInvalidOperationException- Operations called in wrong stateArgumentNullException- Invalid parameter valuesArgumentOutOfRangeException- Invalid parameter valuesIOException- Network communication errorsWebException- Errors related to REST calls to ScanHead
ScanSystem¶
ScanSystem.IsConnected- Overall system connection stateScanSystem.IsScanning- Current scanning operation statusScanSystem.ScanHeads- Collection of discovered scan headsScanSystem.Connect- If there is a problem, theConnectmethod could throw a variety of exceptions
ScanHead¶
ScanHead.RequestStatus- Current operational statusScanHead.IsConnected- Connection stateScanHeadStatus- ScanHead status object
ScanSync¶
ScanSyncData- ScanSync data object
IProfile¶
IProfile.PacketsExpected- Number of packets expectedIProfile.PacketsReceived- Number of packets receivedProfile.HasValidData- Check for meaningful scan dataIProfile.ValidPointCount- Count of points with valid ataIProfile.GetValidXYPoints- Get valid XY points