mirror of
https://github.com/PretendoNetwork/friends.git
synced 2024-06-01 11:37:53 -04:00
Add missing error handling (part 2)
This commit is contained in:
parent
06d89d8b77
commit
77a1cc11aa
|
@ -13,20 +13,15 @@ func MarkFriendRequestsAsReceived(err error, client *nex.Client, callID uint32,
|
||||||
return nex.Errors.FPD.InvalidArgument
|
return nex.Errors.FPD.InvalidArgument
|
||||||
}
|
}
|
||||||
|
|
||||||
var markErr error
|
|
||||||
for i := 0; i < len(ids); i++ {
|
for i := 0; i < len(ids); i++ {
|
||||||
id := ids[i]
|
id := ids[i]
|
||||||
err = database_wiiu.SetFriendRequestReceived(id)
|
err = database_wiiu.SetFriendRequestReceived(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
globals.Logger.Critical(err.Error())
|
globals.Logger.Critical(err.Error())
|
||||||
markErr = err
|
return nex.Errors.FPD.Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if markErr != nil {
|
|
||||||
return nex.Errors.FPD.Unknown
|
|
||||||
}
|
|
||||||
|
|
||||||
rmcResponse := nex.NewRMCResponse(friends_wiiu.ProtocolID, callID)
|
rmcResponse := nex.NewRMCResponse(friends_wiiu.ProtocolID, callID)
|
||||||
rmcResponse.SetSuccess(friends_wiiu.MethodMarkFriendRequestsAsReceived, nil)
|
rmcResponse.SetSuccess(friends_wiiu.MethodMarkFriendRequestsAsReceived, nil)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue