Class: YUICompressor::ErrorReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/yuicompressor/jruby.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#error(message, source_name, line, line_source, line_offset) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/yuicompressor/jruby.rb', line 16

def error(message, source_name, line, line_source, line_offset)
  if line < 0
    "\n[ERROR] %s" % message
  else
    "\n[ERROR] %s:%s:%s" % [line, line_offset, message]
  end
end

#runtimeError(*args) ⇒ Object



24
25
26
# File 'lib/yuicompressor/jruby.rb', line 24

def runtimeError(*args)
  raise 'Compression failed: %s' % error(*args)
end