OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

FrameTimeoutException

public sealed class FrameTimeoutException : FrameCaptureException

No frame arrived within the time allowed.

A subclass of FrameCaptureException, so code that does not care why a frame failed to arrive can catch the base type. This is distinct from cancellation: a cancelled wait raises OperationCanceledException, because the caller asked for that and it is not an error.

Example

try
{
    using ThermalFrame frame = await camera.AcquireFrameAsync(token);
}
catch (FrameTimeoutException)
{
    Console.WriteLine("the camera has stopped producing frames");
}
catch (OperationCanceledException)
{
    Console.WriteLine("we asked it to stop");
}

FrameTimeoutException: constructors

public FrameTimeoutException(string message)

Create the exception.

  • message: What went wrong.
public FrameTimeoutException(string message, int status)

Create the exception with its native status.

  • message: What went wrong.
  • status: The native status code.