Skip to content

Commit

Permalink
Merge pull request #44 from dylanhitt/error
Browse files Browse the repository at this point in the history
Error
  • Loading branch information
NSEcho authored Sep 20, 2024
2 parents 6e7c3c6 + 6a4f2ec commit 5439ad0
Show file tree
Hide file tree
Showing 13 changed files with 273 additions and 439 deletions.
5 changes: 1 addition & 4 deletions frida/bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ func (b *Bus) IsDetached() bool {
func (b *Bus) Attach() error {
var err *C.GError
C.frida_bus_attach_sync(b.bus, nil, &err)
if err != nil {
return &FError{err}
}
return nil
return handleGError(err)
}

// Post send(post) msg to the device.
Expand Down
12 changes: 2 additions & 10 deletions frida/comp.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ func (c *Compiler) Build(entrypoint string) (string, error) {

var err *C.GError
ret := C.frida_compiler_build_sync(c.cc, entrypointC, nil, nil, &err)
if err != nil {
return "", &FError{err}
}

return C.GoString(ret), nil
return C.GoString(ret), handleGError(err)
}

// Watch watches for changes at the entrypoint and sends the "output" signal.
Expand All @@ -45,11 +41,7 @@ func (c *Compiler) Watch(entrypoint string) error {

var err *C.GError
C.frida_compiler_watch_sync(c.cc, entrypointC, nil, nil, &err)
if err != nil {
return &FError{err}
}

return nil
return handleGError(err)
}

// Clean will clean resources held by the compiler.
Expand Down
Loading

0 comments on commit 5439ad0

Please sign in to comment.