check return of define_anon_js to return proper error AZ935
check return of define_anon_js to return proper error
AZ935

Before this patch, the error tuple would be passed to invoke_js,
producing a function clause error in js_driver later.  With this patch,
the bad_encoding error is returned to the caller correctly.

andytill/riak_kv