lib/ernie.rb in ernie-0.3.1 vs lib/ernie.rb in ernie-0.3.2
- old
+ new
@@ -81,9 +81,20 @@
f.send!(xres)
end
f.receive_loop
end
+ f.when([:cast, Symbol, Symbol, Array]) do |mod, fun, args|
+ self.log("-> " + [:cast, mod, fun, args].inspect)
+ begin
+ self.dispatch(mod, fun, args)
+ rescue Object => e
+ # ignore
+ end
+ f.send!([:noreply])
+ f.receive_loop
+ end
+
f.when(Any) do |any|
self.log("-> " + any.inspect)
xres = [:error, [:server, 0, "Invalid request: #{any.inspect}"]]
self.log("<- " + xres.inspect)
f.send!(xres)
\ No newline at end of file