Method: Nugrant::Helper::Stack.fetch_error_region

Defined in:
lib/nugrant/helper/stack.rb

.fetch_error_region(stack, options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/nugrant/helper/stack.rb', line 6

def self.fetch_error_region(stack, options = {})
  entry = find_entry(stack, options)
  location = extract_error_location(entry, options)

  return (options[:unknown] || "Unknown") if not location[:file] and not location[:line]
  return location[:file] if not location[:line]

  fetch_error_region_from_location(location, options)
end