Click or drag to resize

ExceptionManagerAll Method

Retrieves all exceptions that have occurred in a case

Namespace:  Law.EdaIntegration.Exceptions
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.3
Syntax
C#
public IEnumerable<ExceptionItem> All(
	ExceptionFilter filter = null
)

Parameters

filter (Optional)
Type: Law.EdaIntegration.ExceptionsExceptionFilter
The filters to apply to limit the exceptions returned

Return Value

Type: IEnumerableExceptionItem
A list of ExceptionItem
Examples
The following example demonstrates retrieving the a list of exceptions for a case.
C#
using Law.EdaIntegration;
using Law.EdaIntegration.Case;
using Law.EdaIntegration.Exceptions;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);
        Case 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 (ExceptionItem 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 Law.EdaIntegration;
using Law.EdaIntegration.Case;
using Law.EdaIntegration.Exceptions;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);
        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        var 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 (ExceptionItem exception in edaCase.Exceptions.All(types))
        {
            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