RaviDeclinedException
public sealed class RaviDeclinedException : OptrisSdkException
A PIX Connect recording that Ravi.ImportAsync(…) declines to convert: it has no radiometric model, or it comes from a short-wave camera and RaviImportOptions.AllowShortWave is off.
Not a failure. The file was read, and the answer is that no honest temperature can be made from it with these options. RaviDeclinedException.Verdict says which of the two it was, so a caller can offer "convert anyway" for a short-wave file and nothing for one with no model. A file that cannot be read at all is a SdkIOException instead.
Ravi.Inspect(…) answers the same question before a conversion is attempted, and is the cheaper way to sort a folder.
Example
try { await Ravi.ImportAsync("old.ravi", "old.mkv"); } catch (RaviDeclinedException e) when (e.Verdict == RaviVerdict.ShortWave) { await Ravi.ImportAsync("old.ravi", "old.mkv", new RaviImportOptions { AllowShortWave = true }); }
RaviDeclinedException: constructors
public RaviDeclinedException(string message, RaviVerdict verdict)
Create the exception.
message: Why, naming the file.verdict:RaviVerdict.NoModelorRaviVerdict.ShortWave.
public RaviDeclinedException(string message, int status, RaviVerdict verdict)
Create the exception with its native status.
message: Why, naming the file.status: The native status code.verdict:RaviVerdict.NoModelorRaviVerdict.ShortWave.
RaviDeclinedException: properties
public RaviVerdict Verdict { get; }
Which of the two reasons it was.