Class Exception
In: vendor/activesupport/lib/active_support/dependencies.rb
Parent: Object

Add file-blaming to exceptions

Methods

Public Instance methods

[Source]

     # File vendor/activesupport/lib/active_support/dependencies.rb, line 207
207:   def blame_file!(file)
208:     (@blamed_files ||= []).unshift file
209:   end

[Source]

     # File vendor/activesupport/lib/active_support/dependencies.rb, line 211
211:   def blamed_files
212:     @blamed_files ||= []
213:   end

[Source]

     # File vendor/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

[Validate]