Exception: Hanami::CLI::RubyFileGenerator::GeneratedUnparseableCodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/hanami/cli/ruby_file_generator.rb

Overview

Since:

  • 2.0.0

Instance Method Summary collapse

Constructor Details

#initialize(source_code) ⇒ GeneratedUnparseableCodeError

Returns a new instance of GeneratedUnparseableCodeError.

Since:

  • 2.0.0



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/hanami/cli/ruby_file_generator.rb', line 11

def initialize(source_code)
  super(
    <<~ERROR_MESSAGE
      Sorry, the code we generated is not valid Ruby.

      Here's what we got:

      #{source_code}

      Please fix the errors and try again.
    ERROR_MESSAGE
  )
end