When you call methods on a JavaScript method from ruby, exception handling is safe, all javascript exceptions are marked as handled, and they are raised in ruby to be handled by the client. (If they are not handled, they are re-raised in JavaScript).
Using the lower level API (ex: obj[:method].apply(obj, *args)) you are expected to supply a block to handle exceptions. If you don't handle them, and continue to interact with javascript, the process will crash.
Both of these API's should be safe. And the block handling of exceptions is strange. Should probably just re-raise in both cases.
When you call methods on a JavaScript method from ruby, exception handling is safe, all javascript exceptions are marked as handled, and they are raised in ruby to be handled by the client. (If they are not handled, they are re-raised in JavaScript).
Using the lower level API (ex:
obj[:method].apply(obj, *args)
) you are expected to supply a block to handle exceptions. If you don't handle them, and continue to interact with javascript, the process will crash.Both of these API's should be safe. And the block handling of exceptions is strange. Should probably just re-raise in both cases.