Skip to content

Commit

Permalink
add recovery to other public API
Browse files Browse the repository at this point in the history
  • Loading branch information
TwFlem committed Dec 14, 2023
1 parent dcd5aff commit 4dde901
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bwt/bwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ type BWT struct {
// Count represents the number of times the provided pattern
// shows up in the original sequence.
func (bwt BWT) Count(pattern string) (count int, err error) {
// defer func() { BWTRecoverAPIBoundary("Count", *err) }()
defer bwtRecovery("Count", &err)

searchRange := bwt.lfSearch(pattern)
return searchRange.end - searchRange.start, nil
Expand All @@ -204,7 +204,7 @@ func (bwt BWT) Count(pattern string) (count int, err error) {
// of the provided pattern occurs in the original
// sequence.
func (bwt BWT) Locate(pattern string) (offsets []int, err error) {
// defer func() { BWTRecoverAPIBoundary("Locate") }()
defer bwtRecovery("Locate", &err)

searchRange := bwt.lfSearch(pattern)
if searchRange.start >= searchRange.end {
Expand Down

0 comments on commit 4dde901

Please sign in to comment.