Exception: VerilogTools::GenerateError
- Inherits:
-
StandardError
- Object
- StandardError
- VerilogTools::GenerateError
- Defined in:
- lib/HDLRuby/verilog_hruby.rb
Overview
The class describing generation errors.
Instance Method Summary collapse
-
#initialize(msg, lpos, filename) ⇒ GenerateError
constructor
Create a new parse error with message +msg+, faulty line number +lpos+, and possibly file name +filename+.
-
#make_message ⇒ Object
Generate the error message.
Constructor Details
#initialize(msg, lpos, filename) ⇒ GenerateError
Create a new parse error with message +msg+, faulty line number +lpos+, and possibly file name +filename+.
163 164 165 166 167 168 |
# File 'lib/HDLRuby/verilog_hruby.rb', line 163 def initialize(msg,lpos,filename) @msg = msg.to_s @lpos = lpos.to_i @filename = filename.to_s if filename super(self.) end |
Instance Method Details
#make_message ⇒ Object
Generate the error message. NOTE: if you want to translate the error message, please redefine the function.
173 174 175 176 177 178 179 180 |
# File 'lib/HDLRuby/verilog_hruby.rb', line 173 def if @filename then head = "Generation error for file '#{@filename}' " else head = "Generation error " end return head + "line #{@lpos}: " + @msg + "." end |