mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
591 B
19 lines
591 B
8 years ago
|
#include <node.h>
|
||
|
#include <v8.h>
|
||
|
|
||
|
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||
|
v8::Isolate* isolate = args.GetIsolate();
|
||
|
v8::HandleScope scope(isolate);
|
||
|
args.GetReturnValue().Set(node::ErrnoException(isolate,
|
||
|
10,
|
||
|
"syscall",
|
||
|
"some error msg",
|
||
|
"päth"));
|
||
|
}
|
||
|
|
||
|
void init(v8::Local<v8::Object> exports) {
|
||
|
NODE_SET_METHOD(exports, "errno", Method);
|
||
|
}
|
||
|
|
||
|
NODE_MODULE(binding, init)
|