~singpolyma/em_promise.rb

Allow users to catch only some errors

This implements the common pattern:

promise.catch do |e|
	if SomeError === e
		# handle
	else
		EMPromise.reject(e)
	end
end

It also allows for this usage for more granular catching:

promise.catch_only(filter: ->(e) { e == :done }) do
	"all done"
end