Add file-blaming to exceptions
Methods
Public Instance methods
[ show source ]
# File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 205
205: def blame_file!(file)
206: (@blamed_files ||= []).unshift file
207: end
[ show source ]
# File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 209
209: def blamed_files
210: @blamed_files ||= []
211: end
[ show source ]
# File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 218
218: def copy_blame!(exc)
219: @blamed_files = exc.blamed_files.clone
220: self
221: end
[ show source ]
# File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 213
213: def describe_blame
214: return nil if blamed_files.empty?
215: "This error occured while loading the following files:\n #{blamed_files.join "\n "}"
216: end