Class: Dramatis::Runtime::Actor::Main::DefaultBehavior

Inherits:
Object
  • Object
show all
Defined in:
lib/dramatis/runtime/actor.rb

Overview

:nodoc: all

Defined Under Namespace

Classes: Exception

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object

Raises:



251
252
253
# File 'lib/dramatis/runtime/actor.rb', line 251

def method_missing *args
  raise Exception.new( "must use Actor#become to enable main actor" )
end

Instance Method Details

#dramatis_exception(e) ⇒ Object



255
256
257
258
259
260
261
# File 'lib/dramatis/runtime/actor.rb', line 255

def dramatis_exception e
  if Dramatis::Runtime.current.warnings?
    warn "exception on main thread: #{e}"
    # pp caller
  end
  Dramatis::Runtime.current.exception e
end