summaryrefslogtreecommitdiffstats
path: root/models/issues/stopwatch.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issues/stopwatch.go')
-rw-r--r--models/issues/stopwatch.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/models/issues/stopwatch.go b/models/issues/stopwatch.go
index 0a7ad41f9c..a87fbfafa2 100644
--- a/models/issues/stopwatch.go
+++ b/models/issues/stopwatch.go
@@ -25,6 +25,10 @@ func (err ErrIssueStopwatchNotExist) Error() string {
return fmt.Sprintf("issue stopwatch doesn't exist[uid: %d, issue_id: %d", err.UserID, err.IssueID)
}
+func (err ErrIssueStopwatchNotExist) Unwrap() error {
+ return util.ErrNotExist
+}
+
// ErrIssueStopwatchAlreadyExist represents an error that stopwatch is already exist
type ErrIssueStopwatchAlreadyExist struct {
UserID int64
@@ -35,6 +39,10 @@ func (err ErrIssueStopwatchAlreadyExist) Error() string {
return fmt.Sprintf("issue stopwatch already exists[uid: %d, issue_id: %d", err.UserID, err.IssueID)
}
+func (err ErrIssueStopwatchAlreadyExist) Unwrap() error {
+ return util.ErrAlreadyExist
+}
+
// Stopwatch represents a stopwatch for time tracking.
type Stopwatch struct {
ID int64 `xorm:"pk autoincr"`