Merge lp:~abreu-alexandre/cordova-ubuntu/add-debug-message-for-dlopen-failure into lp:cordova-ubuntu/2.8

Proposed by Alexandre Abreu on 2014-01-30
Status: Merged
Approved by: Robert Bruce Park on 2014-01-30
Approved revision: 254
Merged at revision: 254
Proposed branch: lp:~abreu-alexandre/cordova-ubuntu/add-debug-message-for-dlopen-failure
Merge into: lp:cordova-ubuntu/2.8
Diff against target: 25 lines (+15/-1)
1 file modified
src/cordova.cpp (+15/-1)
To merge this branch: bzr merge lp:~abreu-alexandre/cordova-ubuntu/add-debug-message-for-dlopen-failure
Reviewer Review Type Date Requested Status
Robert Bruce Park (community) 2014-01-30 Approve on 2014-01-30
PS Jenkins bot continuous-integration Approve on 2014-01-30
Review via email: mp+203870@code.launchpad.net

Commit message

Add a more precise debug message when a candidate for libcordovaplugins fails to load

Description of the change

Add a more precise debug message when a candidate for libcordovaplugins fails to load, which currently happens quite a bit ... and no context makes it hard to debug in some instances.

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Robert Bruce Park (robru) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/cordova.cpp'
2--- src/cordova.cpp 2013-07-23 10:30:29 +0000
3+++ src/cordova.cpp 2014-01-30 03:23:54 +0000
4@@ -104,7 +104,21 @@
5
6 CordovaGetPluginInstances loader = (CordovaGetPluginInstances) QLibrary::resolve(path, "cordovaGetPluginInstances");
7 if (!loader) {
8- qCritical() << "Missing cordovaGetPluginInstances symbol in" << path;
9+ QLibrary library(path);
10+ library.load();
11+ if ( ! library.isLoaded())
12+ {
13+ qCritical() << "Cannot load:"
14+ << path
15+ << ", reason:"
16+ << library.errorString();
17+ }
18+ else
19+ {
20+ library.unload();
21+ qCritical() << "Missing cordovaGetPluginInstances symbol in"
22+ << path;
23+ }
24 continue;
25 }
26

Subscribers

People subscribed via source and target branches