Module: Vertx::StreamBase

Included in:
ReadStream, StreamBaseImpl, WriteStream
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/stream_base.rb

Instance Method Summary (collapse)

Instance Method Details

- (self) exception_handler { ... }

Set an exception handler.

Yields:

  • the handler

Returns:

  • (self)

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/stream_base.rb', line 8

def exception_handler
  if block_given?
    @j_del.java_method(:exceptionHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.from_throwable(event)) }))
    return self
  end
  raise ArgumentError, "Invalid arguments when calling exception_handler()"
end