diff options
author | Keuin <[email protected]> | 2023-07-02 16:12:13 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-02 16:12:13 +0800 |
commit | 76a7674dae069e0be15bed6af8450ad214f8dde2 (patch) | |
tree | 5b0f1b09ce3c212c5dcc88d53667421cd3d5ac9d /bilibili/streaming.go | |
parent | 6f7987593a9db5500fa56fef0ec1845a02df9876 (diff) |
Refactor: distinct task errors with type enum.
Diffstat (limited to 'bilibili/streaming.go')
-rw-r--r-- | bilibili/streaming.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bilibili/streaming.go b/bilibili/streaming.go index d081a8f..b985bbb 100644 --- a/bilibili/streaming.go +++ b/bilibili/streaming.go @@ -4,7 +4,7 @@ import ( "context" "errors" "fmt" - errors2 "github.com/keuin/slbr/bilibili/errors" + errs "github.com/keuin/slbr/bilibili/errors" "github.com/keuin/slbr/common" "io" "net/http" @@ -71,7 +71,7 @@ func (b Bilibili) CopyLiveStream( out, err = fileCreator() if err != nil { b.logger.Error("Cannot open file for writing: %v", err) - err = errors2.NewUnrecoverableTaskError("failed to create file", err) + err = errs.NewError(errs.FileCreation, err) return } _, err = out.Write(initBytes) |