Permalink
Browse files

util, feat: output Error object friendly.

  • Loading branch information...
xicilion committed Dec 20, 2017
1 parent 52b984c commit 2e6e961dbb40e34edf578da3f4bee45ecbe40b69
Showing with 6 additions and 0 deletions.
  1. +6 −0 fibjs/src/util/util_format.cpp
@@ -96,6 +96,12 @@ exlib::string json_format(v8::Local<v8::Value> obj)
do {
v8::Local<v8::Object> obj = v->ToObject();
if (obj->IsNativeError()) {
v8::String::Utf8Value msg(obj);
strBuffer.append(*msg);
break;
}
obj_ptr<Buffer_base> buf = Buffer_base::getInstance(v);
if (buf) {
static char hexs[] = "0123456789abcdef";

0 comments on commit 2e6e961

Please sign in to comment.