Skip to content

Commit 015a10f

Browse files
author
Devendra
committed
adding more error messages on network disconnection
1 parent 95c557e commit 015a10f

File tree

22 files changed

+52
-64
lines changed

22 files changed

+52
-64
lines changed

core/pubnub-common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ function PN_API(setup) {
12391239
'each' : each,
12401240
'each-channel' : each_channel,
12411241
'grep' : grep,
1242-
'offline' : function(){_reset_offline(1)},
1242+
'offline' : function(){_reset_offline(1, { "message":"Offline. Please check your network settings." })},
12431243
'supplant' : supplant,
12441244
'now' : rnow,
12451245
'unique' : unique,

modern/pubnub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ function PN_API(setup) {
12401240
'each' : each,
12411241
'each-channel' : each_channel,
12421242
'grep' : grep,
1243-
'offline' : function(){_reset_offline(1)},
1243+
'offline' : function(){_reset_offline(1, { "message":"Offline. Please check your network settings." })},
12441244
'supplant' : supplant,
12451245
'now' : rnow,
12461246
'unique' : unique,

modern/pubnub.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node.js/pubnub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ function PN_API(setup) {
12401240
'each' : each,
12411241
'each-channel' : each_channel,
12421242
'grep' : grep,
1243-
'offline' : function(){_reset_offline(1)},
1243+
'offline' : function(){_reset_offline(1, { "message":"Offline. Please check your network settings." })},
12441244
'supplant' : supplant,
12451245
'now' : rnow,
12461246
'unique' : unique,

phonegap/pubnub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ function PN_API(setup) {
12401240
'each' : each,
12411241
'each-channel' : each_channel,
12421242
'grep' : grep,
1243-
'offline' : function(){_reset_offline(1)},
1243+
'offline' : function(){_reset_offline(1, { "message":"Offline. Please check your network settings." })},
12441244
'supplant' : supplant,
12451245
'now' : rnow,
12461246
'unique' : unique,

phonegap/pubnub.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sencha/pubnub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ function PN_API(setup) {
12401240
'each' : each,
12411241
'each-channel' : each_channel,
12421242
'grep' : grep,
1243-
'offline' : function(){_reset_offline(1)},
1243+
'offline' : function(){_reset_offline(1, { "message":"Offline. Please check your network settings." })},
12441244
'supplant' : supplant,
12451245
'now' : rnow,
12461246
'unique' : unique,

sencha/pubnub.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

smart-tv/pubnub.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ function PN_API(setup) {
13901390
'each' : each,
13911391
'each-channel' : each_channel,
13921392
'grep' : grep,
1393-
'offline' : function(){_reset_offline(1)},
1393+
'offline' : function(){_reset_offline(1, { "message":"Offline. Please check your network settings." })},
13941394
'supplant' : supplant,
13951395
'now' : rnow,
13961396
'unique' : unique,
@@ -2823,7 +2823,7 @@ function xdr( setup ) {
28232823
, id = unique()
28242824
, finished = 0
28252825
, xhrtme = setup.timeout || DEF_TIMEOUT
2826-
, timer = timeout( function(){done(1)}, xhrtme )
2826+
, timer = timeout( function(){done(1, {"message" : "timeout"})}, xhrtme )
28272827
, fail = setup.fail || function(){}
28282828
, data = setup.data || {}
28292829
, success = setup.success || function(){}
@@ -2887,7 +2887,7 @@ function ajax( setup ) {
28872887
, complete = 0
28882888
, loaded = 0
28892889
, xhrtme = setup.timeout || DEF_TIMEOUT
2890-
, timer = timeout( function(){done(1)}, xhrtme )
2890+
, timer = timeout( function(){done(1, {"message" : "timeout"})}, xhrtme )
28912891
, fail = setup.fail || function(){}
28922892
, data = setup.data || {}
28932893
, success = setup.success || function(){}

0 commit comments

Comments
 (0)