Skip to content

Commit

Permalink
Merge pull request #53 from Timothy-Liuxf/dev
Browse files Browse the repository at this point in the history
docs: 📝 correct English translation in xml docs
  • Loading branch information
Timothy-Liuxf authored Oct 24, 2022
2 parents dc135a4 + 8186d74 commit 97067c5
Show file tree
Hide file tree
Showing 3 changed files with 259 additions and 259 deletions.
70 changes: 35 additions & 35 deletions CSharp/FrameRateTask/Exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,40 @@

namespace Timothy.FrameRateTask
{
/// <summary>
/// This exception will be thrown when the user gets the return value without the task finished.
/// </summary>
public class TaskNotFinishedException : Exception
{
///
public override string Message => "The task has not finished!";
}

/// <summary>
/// This exception will be thrown when the time interval specified is invalid.
/// </summary>
public class IllegalTimeIntervalException : Exception
{
///
public override string Message => "The time interval should be positive and no more than 1000ms!";
}

/// <summary>
/// This exception will be thrown when time exceeds but time exceeding is not allowed.
/// </summary>
public class TimeExceedException : Exception
{
///
public override string Message => "The loop runs too slow that it cannot finish the task in the given time!";
}

/// <summary>
/// This exception will be thrown when the user trys to start a task which has started.
/// </summary>
public class TaskStartedMoreThanOnceException : Exception
{
///
public override string Message => "The task has started more than once!";
}
/// <summary>
/// The exception that is thrown when the user gets the return value while the task has not yet finished.
/// </summary>
public class TaskNotFinishedException : InvalidOperationException
{
///
public override string Message => "The task has not yet finished!";
}

/// <summary>
/// The exception that is thrown when the specified time interval is invalid.
/// </summary>
public class IllegalTimeIntervalException : ArgumentOutOfRangeException
{
///
public override string Message => "The time interval should be a positive number and not exceed 1000ms!";
}

/// <summary>
/// The exception that is thrown when the task times out.
/// </summary>
public class TimeExceedException : TimeoutException
{
///
public override string Message => "The loop runs so slowly that it cannot complete the task in the given time!";
}

/// <summary>
/// The exception that is thrown when the user tries to start a task that has already been started.
/// </summary>
public class TaskStartedMoreThanOnceException : InvalidOperationException
{
///
public override string Message => "The task has been started more than once!";
}

}
Loading

0 comments on commit 97067c5

Please sign in to comment.