Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Include "error" property when fetching proplist of native error which

is a part of workaround for V8's bug 1595
  • Loading branch information...
commit 73ecae996bbf74765d95685012484a8ae2e29abc 1 parent 618e4d1
@gleber gleber authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 c_src/erlv8_proplist.cc
View
9 c_src/erlv8_proplist.cc
@@ -10,11 +10,12 @@ TickHandler(ProplistTickHandler) {
v8::Handle<v8::Array> keys;
if (res->val->IsNativeError()) { //workaround for V8 bug #1595
- keys = v8::Array::New(2);
- keys->Set(v8::String::New("0"), v8::String::New("name"));
- keys->Set(v8::String::New("1"), v8::String::New("message"));
+ keys = v8::Array::New(3);
+ keys->Set(v8::String::New("0"), v8::String::New("name"));
+ keys->Set(v8::String::New("1"), v8::String::New("message"));
+ keys->Set(v8::String::New("2"), v8::String::New("stack"));
} else {
- keys = res->val->ToObject()->GetPropertyNames();
+ keys = res->val->ToObject()->GetPropertyNames();
}
ERL_NIF_TERM *arr = (ERL_NIF_TERM *) malloc(sizeof(ERL_NIF_TERM) * keys->Length());
Please sign in to comment.
Something went wrong with that request. Please try again.