Click or drag to resize

IExceptionManagerAll Method

Retrieves all exceptions that have occurred in a case

Namespace:  EdaIntegrationContract.Exceptions
Assembly:  EdaIntegration.Contract (in EdaIntegration.Contract.dll) Version: 1.0
Syntax
C#
IEnumerable<IExceptionItem> All(
	IExceptionFilter filter = null
)

Parameters

filter (Optional)
Type: EdaIntegrationContract.ExceptionsIExceptionFilter
The filters to apply to limit the exceptions returned

Return Value

Type: IEnumerableIExceptionItem
A list of IExceptionItem
Examples
The following example demonstrates retrieving the a list of exceptions for a case.
C#
using EdaIntegrationContract;
using EdaIntegrationContract.Case;
using EdaIntegrationContract.Exceptions;

class Sample
{
    static void Main()
    {
        var edaIntegration = new EdaIntegration().ConnectToExplore();
        ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        string outputFormat = "{0, 6} {1, 6} {2}";
        Console.WriteLine(outputFormat, "Exc Id", "Doc Id", "Message");
        Console.WriteLine(outputFormat, "======", "======", "========================================");
        foreach (IExceptionItem exception in edaCase.Exceptions.All())
        {
            Console.WriteLine(outputFormat, exception.Id, exception.DocumentId, exception.Message);
        }
    }
}
/*
This example produces the following results:

Exc Id Doc Id Message
====== ====== ========================================
     1     26 Eligible file contained no content.
     2     16 Eligible file contained no content.
     3     16 File type could not be identified.
     4     16 0 Byte File.
     5    122 File is encrypted.
     6    122 File contains no content due to encryption.
     7    115 File is encrypted.
     8    115 File contains no content due to encryption.
     9    114 File is encrypted.
    10    114 File contains no content due to encryption.
    11     13 File is encrypted.
    12     13 File contains no content due to encryption.
    13     11 Eligible file contained no content.
    14     17 Eligible file contained no content.
    15    116 Eligible file contained no content.
    16    117 Eligible file contained no content.*/
Examples
The following example demonstrates retrieving the a list of exceptions for encrypted files and file type detection issues that occurred when processing documents in a case.
C#
using EdaIntegrationContract;
using EdaIntegrationContract.Case;
using EdaIntegrationContract.Exceptions;

class Sample
{
    static void Main()
    {
        var edaIntegration = new EdaIntegration().ConnectToExplore();
        ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        IExceptionFilter filt = edaCase.Exceptions.NewExceptionFilter();
        filt.Types = new List<ExceptionType>() { ExceptionType.EncryptedFile, ExceptionType.OcrError };

        string outputFormat = "{0, 6} {1, 6} {2}";
        Console.WriteLine(outputFormat, "Exc Id", "Doc Id", "Message");
        Console.WriteLine(outputFormat, "======", "======", "========================================");
        foreach (IExceptionItem exception in edaCase.Exceptions.All(filt))
        {
            Console.WriteLine(outputFormat, exception.Id, exception.DocumentId, exception.Message);
        }
    }
}
/*
This example produces the following results:

Exc Id Doc Id Message
====== ====== ========================================
     3     16 File type could not be identified.
     5    122 File is encrypted.
     7    115 File is encrypted.
     9    114 File is encrypted.
    11     13 File is encrypted.*/
See Also