| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a711080 commit a3dc7e1
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,8 @@ void ErrName(const FunctionCallbackInfo<Value>& args) { | |||
| 73 | 73 | int err; | |
| 74 | 74 | if (!args[0]->Int32Value(env->context()).To(&err)) return; | |
| 75 | 75 | CHECK_LT(err, 0); | |
| 76 | - const char* name = uv_err_name(err); | ||
| 76 | + char name[50]; | ||
| 77 | + uv_err_name_r(err, name, sizeof(name)); | ||
| 77 | 78 | args.GetReturnValue().Set(OneByteString(env->isolate(), name)); | |
| 78 | 79 | } | |
| 79 | 80 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,8 @@ const { internalBinding } = require('internal/test/binding'); | |||
| 12 | 12 | const uv = internalBinding('uv'); | |
| 13 | 13 | const keys = Object.keys(uv); | |
| 14 | 14 | ||
| 15 | + assert.strictEqual(uv.errname(-111111), 'Unknown system error -111111'); | ||
| 16 | + | ||
| 15 | 17 | keys.forEach((key) => { | |
| 16 | 18 | if (!key.startsWith('UV_')) | |
| 17 | 19 | return; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments