Skip to content

Commit 9b22bef

Browse files
authored
Improve error handling (#84)
* Improve error handling * Always console.log the error * Update package version to 1.3.1
1 parent b171fc5 commit 9b22bef

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

CordovaDemo/platforms/ios/www/plugins/pspdfkit-cordova-ios/PSPDFKitPlugin/pspdfkit.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ var PSPDFKitPlugin = new function() {
3333
}
3434
}
3535
cordova.exec(function (result) {
36-
if (callback) callback(result);
36+
if (callback) callback(result, null);
3737
}, function (error) {
38-
alert(error);
38+
console.log(error);
39+
if (callback) callback(null, error);
3940
}, 'PSPDFKitPlugin', methodName, argArray);
4041
}
4142
})();

PSPDFKitPlugin/pspdfkit.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ var PSPDFKitPlugin = new function() {
3232
}
3333
}
3434
cordova.exec(function (result) {
35-
if (callback) callback(result);
35+
if (callback) callback(result, null);
3636
}, function (error) {
37-
alert(error);
37+
console.log(error);
38+
if (callback) callback(null, error);
3839
}, 'PSPDFKitPlugin', methodName, argArray);
3940
}
4041
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pspdfkit-cordova-ios",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "PSPDFKit Cordova Plugin for iOS",
55
"cordova": {
66
"id": "pspdfkit-cordova-ios",

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<plugin id="pspdfkit-cordova-ios" version="1.3.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
2+
<plugin id="pspdfkit-cordova-ios" version="1.3.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
33
<engines>
44
<engine name="cordova" version=">=6.3.1"/>
55
</engines>

0 commit comments

Comments
 (0)