Exception: MachO::RecoverableModificationError

Inherits:
ModificationError show all
Defined in:
lib/macho/exceptions.rb

Overview

Raised when a Mach-O file modification fails but can be recovered when operating on multiple Mach-O slices of a fat binary in non-strict mode.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#macho_sliceInteger?

Returns The index of the Mach-O slice of a fat binary for which modification failed or nil if not a fat binary. This is used to make the error message more useful.

Returns:

  • (Integer, nil)

    The index of the Mach-O slice of a fat binary for which modification failed or nil if not a fat binary. This is used to make the error message more useful.



23
24
25
# File 'lib/macho/exceptions.rb', line 23

def macho_slice
  @macho_slice
end

Instance Method Details

#to_sString

Returns The exception message.

Returns:

  • (String)

    The exception message.



26
27
28
29
30
# File 'lib/macho/exceptions.rb', line 26

def to_s
  s = super.to_s
  s = "While modifying Mach-O slice #{@macho_slice}: #{s}" if @macho_slice
  s
end