mirror of
https://github.com/jimeh/rbheap.git
synced 2026-02-19 12:56:46 +00:00
Handle previously unhandled error
This commit is contained in:
@@ -39,7 +39,10 @@ objects are present in both B and C, and not present in A.`,
|
||||
case "hex":
|
||||
finder.PrintLeakedAddresses()
|
||||
case "json":
|
||||
finder.PrintLeakedObjects()
|
||||
err := finder.PrintLeakedObjects()
|
||||
if err != nil {
|
||||
er(err)
|
||||
}
|
||||
default:
|
||||
usage_er(
|
||||
cmd,
|
||||
|
||||
@@ -48,9 +48,9 @@ func (s *Finder) PrintLeakedAddresses() {
|
||||
s.Dumps[1].PrintEntryAddress(s.FindLeaks())
|
||||
}
|
||||
|
||||
func (s *Finder) PrintLeakedObjects() {
|
||||
func (s *Finder) PrintLeakedObjects() error {
|
||||
s.log("\nLeaked Objects:")
|
||||
s.Dumps[1].PrintEntryJSON(s.FindLeaks())
|
||||
return s.Dumps[1].PrintEntryJSON(s.FindLeaks())
|
||||
}
|
||||
|
||||
func (s *Finder) FindLeaks() []*string {
|
||||
|
||||
Reference in New Issue
Block a user