@@ -109,8 +109,7 @@ server {
109
109
// Send one iOS push notification.
110
110
// Returns true on success.
111
111
// Returns false on "regular" errors.
112
- // Throws on terrible errors, with the returned `e.DetailedDescription()` good for journaling and further
113
- // investigation.
112
+ // Throws on terrible errors, with the returned `e.DetailedDescription()` good for journaling.
114
113
bool Push (const std::string& recipient_player_id,
115
114
const std::string& message = " " ,
116
115
int32_t increase_counter = 0 ) const {
@@ -147,23 +146,23 @@ server {
147
146
ParseJSON (response.body , parsed_response);
148
147
} catch (const Exception& e) {
149
148
// Resulting JSON error: Fatal.
150
- throw OneSignalPushNotificationException (" OneSignal iOS push error A: " + e.DetailedDescription ());
149
+ CURRENT_THROW ( OneSignalPushNotificationException (" OneSignal iOS push error A: " + e.DetailedDescription () ));
151
150
}
152
151
if (!Exists (parsed_response.recipients )) {
153
152
if (Exists (parsed_response.errors )) {
154
153
// Some "regular" error occurred: Non-fatal.
155
154
return false ;
156
155
} else {
157
156
// Some unexpected error occurred: Fatal.
158
- throw OneSignalPushNotificationException (" OneSignal iOS push error Q: " + response.body );
157
+ CURRENT_THROW ( OneSignalPushNotificationException (" OneSignal iOS push error Q: " + response.body ) );
159
158
}
160
159
}
161
160
if (Value (parsed_response.recipients ) == 0 ) {
162
161
// Just could not send the notification: Non-fatal.
163
162
return false ;
164
163
} else if (Value (parsed_response.recipients ) > 1 ) {
165
164
// Potentially sent the notification to more than one user: Fatal.
166
- throw OneSignalPushNotificationException (" OneSignal iOS push error Z: " + response.body );
165
+ CURRENT_THROW ( OneSignalPushNotificationException (" OneSignal iOS push error Z: " + response.body ) );
167
166
} else {
168
167
// The notification has been sent to exactly one user: OK.
169
168
return true ;
0 commit comments