Exception: Sass::CompileError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sass/compile_error.rb

Overview

An exception thrown because a Sass compilation failed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, full_message, sass_stack, span) ⇒ CompileError

Returns a new instance of CompileError.



12
13
14
15
16
17
# File 'lib/sass/compile_error.rb', line 12

def initialize(message, full_message, sass_stack, span)
  super(message)
  @full_message = full_message == '' ? nil : full_message.dup
  @sass_stack = sass_stack == '' ? nil : sass_stack
  @span = span
end

Instance Attribute Details

#sass_stackString?

Returns:

  • (String, nil)


7
8
9
# File 'lib/sass/compile_error.rb', line 7

def sass_stack
  @sass_stack
end

#spanLogger::SourceSpan?

Returns:



10
11
12
# File 'lib/sass/compile_error.rb', line 10

def span
  @span
end

Instance Method Details

#full_message(*args, **kwargs) ⇒ String

Returns:

  • (String)


20
21
22
23
24
25
26
# File 'lib/sass/compile_error.rb', line 20

def full_message(*args, **kwargs)
  if @full_message.nil?
    super(*args, **kwargs)
  else
    @full_message
  end
end