TaskValidationException Class |
Represents an exception which is thrown when errors are found in project's tasks after recalculation.
Inheritance Hierarchy
Namespace:
Aspose.Tasks
Assembly:
Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax[SerializableAttribute]
public class TaskValidationException : RecalculationValidationException
<SerializableAttribute>
Public Class TaskValidationException
Inherits RecalculationValidationException
[SerializableAttribute]
public ref class TaskValidationException : public RecalculationValidationException
[<SerializableAttribute>]
type TaskValidationException =
class
inherit RecalculationValidationException
end
The TaskValidationException type exposes the following members.
Constructors
Properties
| Name | Description |
---|
 | Data | (Inherited from Exception.) |
 | HelpLink | (Inherited from Exception.) |
 | HResult | (Inherited from Exception.) |
 | InnerException | (Inherited from Exception.) |
 | Message | (Inherited from Exception.) |
 | Source | (Inherited from Exception.) |
 | StackTrace | (Inherited from Exception.) |
 | TargetSite | (Inherited from Exception.) |
Methods
| Name | Description |
---|
 | Equals | (Inherited from Object.) |
 | Finalize | (Inherited from Object.) |
 | GetBaseException | (Inherited from Exception.) |
 | GetHashCode | (Inherited from Object.) |
 | GetObjectData | (Inherited from Exception.) |
 | GetType | (Inherited from Exception.) |
 | MemberwiseClone | (Inherited from Object.) |
 | ToString | (Inherited from Exception.) |
ExamplesShows on what conditions <see cref="TaskValidationException" /> exception can be thrown.
try
{
var project = new Project { CalculationMode = CalculationMode.None };
var task = project.RootTask.Children.Add("Task");
task.Set(Tsk.Start, new DateTime(2017, 6, 19, 8, 0, 0));
task.Set(Tsk.Duration, project.GetDuration(1));
task.Set(Tsk.Finish, new DateTime(2017, 6, 18, 17, 0, 0));
project.Recalculate(true);
}
catch (TaskValidationException ex)
{
Console.WriteLine(ex.Message);
}
See Also