Hi all! I have a question about `Error.prepareStackTrace`.  I want to 
collect all stacks of error and do not affect the user. V8 document said 
`the custom prepareStackTrace function is only called once the stack 
property of Error object is accessed`.  And the code as follows works. Does 
this code have any problem ?
```
function test() {
    Error.prepareStackTrace = (error, stack) => {
        /*
          collect the stack here
        */
          return error.stack;
    };
    const error = new Error();
    throw error;
}
test();
```

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/5f735821-a160-402f-a056-d8b422445a42n%40googlegroups.com.

Reply via email to