Exception: UniverseCompiler::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/universe_compiler/error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#originalObject

Returns the value of attribute original.



5
6
7
# File 'lib/universe_compiler/error.rb', line 5

def original
  @original
end

Class Method Details

.from(exception, message = exception.message) ⇒ Object



7
8
9
10
11
# File 'lib/universe_compiler/error.rb', line 7

def self.from(exception, message = exception.message)
  wrapper = new message
  wrapper.original = exception
  wrapper
end