lib/rex/peparsey/pebase.rb in rex-2.0.7 vs lib/rex/peparsey/pebase.rb in rex-2.0.8
- old
+ new
@@ -1194,29 +1194,29 @@
all_sections.each do |section|
if section.contains_rva?(rva)
return section.rva_to_file_offset(rva)
end
end
- raise WtfError, "wtf!", caller
+ raise PeParseyError, "No section contains RVA", caller
end
def vma_to_file_offset(vma)
return rva_to_file_offset(vma_to_rva(vma))
end
def file_offset_to_rva(foffset)
if foffset < 0
- raise WtfError, "lame", caller
+ raise PeParseyError, "Offset should not be less than 0. The value is: #{foffset}", caller
end
all_sections.each do |section|
if section.contains_file_offset?(foffset)
return section.file_offset_to_rva(foffset)
end
end
- raise WtfError, "wtf! #{foffset}", caller
+ raise PeParseyError, "No section contains file offset #{foffset}", caller
end
def file_offset_to_vma(foffset)
return rva_to_vma(file_offset_to_rva(foffset))
end
@@ -1243,10 +1243,10 @@
end
def find_section_by_rva(rva)
section = _find_section_by_rva(rva)
if !section
- raise WtfError, "Cannot find rva! #{rva}", caller
+ raise PeParseyError, "Cannot find rva! #{rva}", caller
end
return section
end