diff liboctave/oct-shlib.cc @ 9971:d0680ace5fcb

oct-shlib.cc (octave_dlopen_shlib): reverse sense of test and improve error message
author John W. Eaton <jwe@octave.org>
date Fri, 11 Dec 2009 20:59:27 -0500
parents 80432f0ee895
children 4c0cdbe0acca
line wrap: on
line diff
--- a/liboctave/oct-shlib.cc	Fri Dec 11 20:58:51 2009 -0500
+++ b/liboctave/oct-shlib.cc	Fri Dec 11 20:59:27 2009 -0500
@@ -200,10 +200,12 @@
     {
       const char *msg = dlerror ();
 
-      if (! msg)
-        (*current_liboctave_error_handler) ("%s", msg);
+      if (msg)
+        (*current_liboctave_error_handler) ("%s: failed to load: %s",
+                                            file.c_str (), msg);
       else
-        (*current_liboctave_error_handler) ("%s: failed to load", file.c_str ());
+        (*current_liboctave_error_handler) ("%s: failed to load",
+                                            file.c_str ());
     }
 }