Module: ReVIEW::ErrorUtils
- Included in:
- Preprocessor, Repository
- Defined in:
- lib/review/preprocessor.rb
Instance Method Summary collapse
- #error(msg) ⇒ Object
- #filename ⇒ Object
- #init_ErrorUtils(f) ⇒ Object
- #lineno ⇒ Object
- #location ⇒ Object
- #warn(msg) ⇒ Object
Instance Method Details
#error(msg) ⇒ Object
30 31 32 33 |
# File 'lib/review/preprocessor.rb', line 30 def error(msg) @errutils_err = true raise ApplicationError, "#{location()}: #{msg}" end |
#filename ⇒ Object
39 40 41 |
# File 'lib/review/preprocessor.rb', line 39 def filename @errutils_file.path end |
#init_ErrorUtils(f) ⇒ Object
21 22 23 24 |
# File 'lib/review/preprocessor.rb', line 21 def init_ErrorUtils(f) @errutils_file = f @errutils_err = false end |
#lineno ⇒ Object
43 44 45 |
# File 'lib/review/preprocessor.rb', line 43 def lineno @errutils_file.lineno end |
#location ⇒ Object
35 36 37 |
# File 'lib/review/preprocessor.rb', line 35 def location "#{filename()}:#{lineno()}" end |
#warn(msg) ⇒ Object
26 27 28 |
# File 'lib/review/preprocessor.rb', line 26 def warn(msg) $stderr.puts "#{location()}: warning: #{msg}" end |