Exception: Benoit::FileMissingError

Inherits:
CompilerError show all
Defined in:
lib/benoit/compiler_error.rb

Instance Attribute Summary collapse

Attributes inherited from CompilerError

#env, #file_path, #line, #original_error, #output

Instance Method Summary collapse

Methods inherited from CompilerError

#to_json

Methods inherited from StandardError

#type

Constructor Details

#initialize(missing_file, line, file_path, original_error) ⇒ FileMissingError

Returns a new instance of FileMissingError.



47
48
49
50
# File 'lib/benoit/compiler_error.rb', line 47

def initialize(missing_file, line, file_path, original_error)
  @missing_file = missing_file
  super line, file_path, original_error
end

Instance Attribute Details

#missing_fileObject

Returns the value of attribute missing_file.



45
46
47
# File 'lib/benoit/compiler_error.rb', line 45

def missing_file
  @missing_file
end

Instance Method Details

#messageObject



52
53
54
55
56
# File 'lib/benoit/compiler_error.rb', line 52

def message
"You included a file named \#{missing_file.inspect} in \#{file_path.inspect}. I could not find a file with that name. Maybe you forgot to specify a folder?\n"
end