Author: NeX
Date: 2010-03-31 20:34:17 +0200 (Wed, 31 Mar 2010)
New Revision: 28930
Modified:
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
Log:
Friendly error message
Modified:
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
===================================================================
---
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
2010-03-31 16:46:38 UTC (rev 28929)
+++
plugins/sfApplePushNotificationServicePlugin/trunk/lib/task/apnListenNotificationsQueueTask.class.php
2010-03-31 18:34:17 UTC (rev 28930)
@@ -46,8 +46,14 @@
$queue_connection = new $conecction_class;
$queue_connection->connect($arguments['config']['queue']['name']);
if($queue_item = $queue_connection->readMessage()){
- $apn_connection = new ApnConecction();
- $apn_connection->connect();
+ try {
+ $apn_connection = new ApnConecction();
+ $apn_connection->connect();
+ } catch(Exception $e) {
+ echo $e->getMessage();
+ $queue_connection->disconnect();
+ return false;
+ }
if(isset($queue_item['custom_content'])) {
$apn_connection->customSend($queue_item['token'],
$queue_item['custom_content']);
} else {
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" 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/symfony-svn?hl=en.