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