TasksReadingException

TasksReadingException class

Represents the standard internal reading exception type.

public class TasksReadingException : TasksLoggedException

Properties

Name Description
LogText { get; } Gets the exception logging information.
Operation { get; } Gets the exception operation information.

Examples

Shows how to handle project’ reading/writing exceptions.

try
{
    var project = new Project(DataDir + "project.mpp");
    project.Save(OutDir + "HandleExceptions_out.mpp", SaveFileFormat.Mpp);
}
catch (TasksReadingException ex)
{
    Console.WriteLine("Message: ");
    Console.WriteLine(ex.Message);
    Console.WriteLine("Log: ");
    Console.WriteLine(ex.LogText);
    if (ex.InnerException != null)
    {
        Console.WriteLine("Inner exception message: ");
        Console.WriteLine(ex.InnerException.Message);
    }
}

See Also