In the meantime, you can also use gdb to break in that lib loading error clause and manually call dlerror.
Am 13.02.2012 22:29 schrieb "Brian Fundakowski Feldman" < [email protected]>: I did this, neglecting to actually try to format the error message properly, but it was good enough to figure out where I went wrong with linking my module. It would be nice if something like this were integrated to assist module writers. --- src/node.cc.orig 2012-02-02 19:56:42.000000000 -0500 +++ src/node.cc 2012-02-13 15:21:48.000000000 -0500 @@ -35,6 +35,7 @@ #define snprintf _snprintf #endif #include <stdlib.h> +#include <dlfcn.h> #include <string.h> #if !defined(_MSC_VER) #include <strings.h> @@ -1627,7 +1628,7 @@ if (err.code != UV_OK) { Local<Value> exception = Exception::Error( String::Concat(String::New("Unable to load shared library "), - args[0]->ToString())); + String::Concat(args[0]->ToString(), String::New(dlerror())))); return ThrowException(exception); } --- src/node.cc.orig 2012-02-02 19:56:42.000000000 -0500 +++ src/node.cc 2012-02-13 15:21:48.000000000 -0500 @@ -35,6 +35,7 @@ #define snprintf _snprintf #endif #include <stdlib.h> +#include <dlfcn.h> #include <string.h> #if !defined(_MSC_VER) #include <strings.h> @@ -1627,7 +1628,7 @@ if (err.code != UV_OK) { Local<Value> exception = Exception::Error( String::Concat(String::New("Unable to load shared library "), - args[0]->ToString())); + String::Concat(args[0]->ToString(), String::New(dlerror())))); return ThrowException(exception); } --- src/node.cc.orig 2012-02-02 19:56:42.000000000 -0500 +++ src/node.cc 2012-02-13 15:21:48.000000000 -0500 @@ -35,6 +35,7 @@ #define snprintf _snprintf #endif #include <stdlib.h> +#include <dlfcn.h> #include <string.h> #if !defined(_MSC_VER) #include <strings.h> @@ -1627,7 +1628,7 @@ if (err.code != UV_OK) { Local<Value> exception = Exception::Error( String::Concat(String::New("Unable to load shared library "), - args[0]->ToString())); + String::Concat(args[0]->ToString(), String::New(dlerror())))); return ThrowException(exception); } -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
