Exception: Glslkit::WebGL::CompileError

Inherits:
ShaderError show all
Defined in:
lib/glslkit/webgl/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stage:, raw_log:, file: nil, line: nil, detail: nil) ⇒ CompileError

Returns a new instance of CompileError.



19
20
21
22
23
24
25
26
27
# File 'lib/glslkit/webgl/errors.rb', line 19

def initialize(stage:, raw_log:, file: nil, line: nil, detail: nil)
  @stage = stage
  @file = file
  @line = line
  @raw_log = raw_log.to_s
  message = detail || @raw_log
  message = "#{file}:#{line}: #{message}" if file && line
  super(message)
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



17
18
19
# File 'lib/glslkit/webgl/errors.rb', line 17

def file
  @file
end

#lineObject (readonly)

Returns the value of attribute line.



17
18
19
# File 'lib/glslkit/webgl/errors.rb', line 17

def line
  @line
end

#raw_logObject (readonly)

Returns the value of attribute raw_log.



17
18
19
# File 'lib/glslkit/webgl/errors.rb', line 17

def raw_log
  @raw_log
end

#stageObject (readonly)

Returns the value of attribute stage.



17
18
19
# File 'lib/glslkit/webgl/errors.rb', line 17

def stage
  @stage
end