8000 addons, refactor: throw dlerror in posix. · fibjs/fibjs@9b1abae · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 9b1abae

Browse files
committed
addons, refactor: throw dlerror in posix.
1 parent 464db8b commit 9b1abae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fibjs/src/process/process_dlopen.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ result_t process_base::dlopen(v8::Local<v8::Object> module, exlib::string filena
3030

3131
void* handle_ = ::dlopen(filename.c_str(), flags);
3232
if (handle_ == nullptr)
33+
#ifdef WIN32
3334
return CHECK_ERROR(LastError());
35+
#else
36+
return CHECK_ERROR(Runtime::setError(dlerror()));
37+
#endif
3438

3539
Isolate* isolate = Isolate::current();
3640
v8::Local<v8::Context> context = isolate->context();

0 commit comments

Comments
 (0)
0