basho / erlang_js

A linked-in driver for Erlang to Mozilla's Spidermonkey Javascript runtime.
Apache License 2.0
238 stars 88 forks source link

Support non-binary error-reasons in define_js/4 #35

Closed strange closed 11 years ago

strange commented 11 years ago

define_js/4 did not include a pattern to match against non-binary values in the error tuple that can be a result of evaluating call_driver/4. This caused case_clause run-time errors when the reason for the error was not a binary.

({error, timeout} for example).

cmeiklejohn commented 11 years ago

:+1: to merge, https://github.com/basho/erlang_js/blob/master/src/js_driver.erl#L198 is sufficient enough to trigger this condition.