Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exceptions for ids of wrong type. #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/com.heroiclabs.nakama/client/NakamaClient.gd
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func delete_storage_objects_async(p_session : NakamaSession, p_ids : Array) -> N
var ids : Array = []
for id in p_ids:
if not id is NakamaStorageObjectId:
continue # TODO Exceptions
return NakamaAsyncResult.new(NakamaException.new("Id is not a NakamaStorageObjectId: %s" % id))
var obj_id : NakamaStorageObjectId = id
ids.append(obj_id.as_delete().serialize())
return await _api_client.delete_storage_objects_async(p_session,
Expand Down Expand Up @@ -771,7 +771,7 @@ func read_storage_objects_async(p_session : NakamaSession, p_ids : Array): # ->
var ids = []
for id in p_ids:
if not id is NakamaStorageObjectId:
continue # TODO Exceptions
return NakamaAsyncResult.new(NakamaException.new("Id is not a NakamaStorageObjectId: %s" % id))
var obj_id : NakamaStorageObjectId = id
ids.append(obj_id.as_read().serialize())
return await _api_client.read_storage_objects_async(p_session,
Expand Down Expand Up @@ -1042,7 +1042,7 @@ func write_storage_objects_async(p_session : NakamaSession, p_objects : Array):
var writes : Array = []
for obj in p_objects:
if not obj is NakamaWriteStorageObject:
continue # TODO Exceptions
return NakamaAsyncResult.new(NakamaException.new("Obj is not a NakamaWriteStorageObject: %s" % obj))
var write_obj : NakamaWriteStorageObject = obj
writes.append(write_obj.as_write().serialize())
return await _api_client.write_storage_objects_async(p_session,
Expand Down