Exception: Rubuild::Build::Dep::Error::Load

Inherits:
Rubuild::Build::Dep::Error show all
Defined in:
lib/rubuild/build/dep.rb

Overview

Rubuild::Build::Dep::Error::Load Load error (circular dependency detected).

Instance Method Summary collapse

Constructor Details

#initialize(dep, loading) ⇒ Load

Create a Rubuild::Build::Dep::Error::Load Used internally.

dep

The dependency which blocks on its own execution.

loading

Dependencies loaded at the time the circle was detected.



155
156
157
158
159
160
161
# File 'lib/rubuild/build/dep.rb', line 155

def initialize(dep, loading)
  super(
    dep,
    "Circular dependency detected."
    )
  self.rubuild_build_dep_error_load__loading = loading
end

Instance Method Details

#report(file) ⇒ Object

Rubuild::Build::Dep::Error::Load#initialize



163
164
165
166
167
168
169
170
171
172
# File 'lib/rubuild/build/dep.rb', line 163

def report(file)
  file.puts("#{self.dep.name} loaded from:\n")
  self.loading.each do |trace|
    file.puts("  #{trace.name}")
  end
  file.puts("call stack:")
  self.backtrace.each do |stack|
    file.puts("  #{stack}")
  end
end