Trigger ItemFinished when temp file creation fails instead of failing silently

This commit is contained in:
Jakob Borg
2015-05-27 11:14:39 +02:00
parent e952da7f91
commit c1761cab49
4 changed files with 114 additions and 67 deletions

View File

@@ -258,3 +258,14 @@ func (s *BufferedSubscription) Since(id int, into []Event) []Event {
return into
}
// Error returns a string pointer suitable for JSON marshalling errors. It
// retains the "null on sucess" semantics, but ensures the error result is a
// string regardless of the underlying concrete error type.
func Error(err error) *string {
if err == nil {
return nil
}
str := err.Error()
return &str
}