sync: Give the type of non-implemented flag type
This commit is contained in:
parent
c70eb7f582
commit
df90c5c72f
@ -5,6 +5,7 @@ import (
|
||||
_ "crypto/sha1"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"hash"
|
||||
"io"
|
||||
"os"
|
||||
@ -330,7 +331,7 @@ func (f *EFile) AddDepend(j Flag) (err error) {
|
||||
} else if m, ok := j.(*MCQ); ok {
|
||||
_, err = DBExec("INSERT INTO exercice_files_omcq_deps (id_file, id_mcq) VALUES (?, ?)", f.Id, m.Id)
|
||||
} else {
|
||||
err = errors.New("dependancy type not implemented for this file")
|
||||
err = fmt.Errorf("dependancy type for flag (%T) not implemented for this file", j)
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -342,7 +343,7 @@ func (f *EFile) DeleteDepend(j Flag) (err error) {
|
||||
} else if m, ok := j.(*MCQ); ok {
|
||||
_, err = DBExec("DELETE FROM exercice_files_omcq_deps WHERE id_file = ? AND id_mcq = ?", f.Id, m.Id)
|
||||
} else {
|
||||
err = errors.New("dependancy type not implemented for this file")
|
||||
err = fmt.Errorf("dependancy type for flag (%T) not implemented for this file", j)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user