-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve error handling and introduce analysis cancellation support
- Added a new error type, ErrAnalysisCanceled, to handle user-initiated cancellations during audio analysis. - Updated error handling in main.go and directory.go to utilize the new error type for clearer cancellation feedback. - Enhanced synchronization in file.go to ensure safe access to processing errors across goroutines. These changes enhance the robustness of audio processing by providing clearer error reporting and supporting graceful cancellation of analysis tasks.
- Loading branch information
Showing
4 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package analysis | ||
|
||
import "errors" | ||
|
||
// ErrAnalysisCanceled is returned when the analysis is canceled by the user | ||
var ErrAnalysisCanceled = errors.New("analysis canceled") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters