{"action":"created","comment":{"url":"https://api.github.com/repos/openT2T/client/pulls/comments/71141463","id":71141463,"diff_hunk":"@@ -0,0 +1,81 @@\n+\n+void ExceptionToNSError(std::exception_ptr ex, NSError** outError)\n+{\n+    if (ex != nullptr)\n+    {\n+        // TODO: Use other domains/error codes for some exceptions.\n+        NSString* domain = @\"OpenT2T\";\n+        NSInteger code = 1;\n+        NSString* description = nil;\n+\n+        try\n+        {\n+            std::rethrow_exception(ex);\n+        }\n+        catch (const std::out_of_range& stdex)\n+        {\n+            description = [NSString stringWithUTF8String: stdex.what()];\n+        }\n+        catch (const std::length_error& stdex)\n+        {\n+            description = [NSString stringWithUTF8String: stdex.what()];\n+        }\n+        catch (const std::invalid_argument& stdex)\n+        {\n+            description = [NSString stringWithUTF8String: stdex.what()];\n+        }\n+        catch (const std::bad_cast& stdex)\n+        {\n+            description = [NSString stringWithUTF8String: stdex.what()];\n+        }\n+        catch (const std::logic_error& stdex)\n+        {\n+            description = [NSString stringWithUTF8String: stdex.what()];\n+        }\n+        catch (const std::runtime_error& stdex)\n+        {\n+            description = [NSString stringWithUTF8String: stdex.what()];\n+        }\n+        catch (const std::exception& stdex)\n+        {\n+            description = [NSString stringWithUTF8String: stdex.what()];\n+        }\n+        catch (...)\n+        {\n+        }\n+\n+        NSDictionary* userInfo;\n+        if (description != nil)\n+        {\n+            OpenT2T::LogTrace(\"ExceptionToNSError(\\\"%s\\\")\", description.UTF8String);\n+            userInfo = @{ NSLocalizedDescriptionKey : description };\n+        }\n+        else\n+        {\n+            OpenT2T::LogTrace(\"ExceptionToNSError(\\\"\\\")\");\n+            userInfo = @{};\n+        }\n+\n+        if (outError != nil)\n+        {\n+            *outError = [[NSError alloc] initWithDomain: domain code: code userInfo: userInfo];\n+        }\n+    }\n+}\n+\n+bool ValidateArgumentNotNull(const char* methodName, const char* argName, NSObject* arg, NSError** outError)\n+{\n+    if (arg == nil)\n+    {\n+        std::string message = std::string() +","path":"node/src/ios/OpenT2TClient/ObjCppUtils.h","position":70,"original_position":70,"commit_id":"1877d56bc9676b50ddf65cb6176fbf2b4c24af12","original_commit_id":"1877d56bc9676b50ddf65cb6176fbf2b4c24af12","user":{"login":"obastemur","id":4390745,"avatar_url":"https://avatars.githubusercontent.com/u/4390745?v=3","gravatar_id":"","url":"https://api.github.com/users/obastemur","html_url":"https://github.com/obastemur","followers_url":"https://api.github.com/users/obastemur/followers","following_url":"https://api.github.com/users/obastemur/following{/other_user}","gists_url":"https://api.github.com/users/obastemur/gists{/gist_id}","starred_url":"https://api.github.com/users/obastemur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obastemur/subscriptions","organizations_url":"https://api.github.com/users/obastemur/orgs","repos_url":"https://api.github.com/users/obastemur/repos","events_url":"https://api.github.com/users/obastemur/events{/privacy}","received_events_url":"https://api.github.com/users/obastemur/received_events","type":"User","site_admin":false},"body":"How about NSString formatting this string?","created_at":"2016-07-18T12:53:32Z","updated_at":"2016-07-18T12:53:32Z","html_url":"https://github.com/openT2T/client/pull/1#discussion_r71141463","pull_request_url":"https://api.github.com/repos/openT2T/client/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/openT2T/client/pulls/comments/71141463"},"html":{"href":"https://github.com/openT2T/client/pull/1#discussion_r71141463"},"pull_request":{"href":"https://api.github.com/repos/openT2T/client/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/openT2T/client/pulls/1","id":77572479,"html_url":"https://github.com/openT2T/client/pull/1","diff_url":"https://github.com/openT2T/client/pull/1.diff","patch_url":"https://github.com/openT2T/client/pull/1.patch","issue_url":"https://api.github.com/repos/openT2T/client/issues/1","number":1,"state":"open","locked":false,"title":"Cross-platform node hosting API","user":{"login":"jasongin","id":13093042,"avatar_url":"https://avatars.githubusercontent.com/u/13093042?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongin","html_url":"https://github.com/jasongin","followers_url":"https://api.github.com/users/jasongin/followers","following_url":"https://api.github.com/users/jasongin/following{/other_user}","gists_url":"https://api.github.com/users/jasongin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongin/subscriptions","organizations_url":"https://api.github.com/users/jasongin/orgs","repos_url":"https://api.github.com/users/jasongin/repos","events_url":"https://api.github.com/users/jasongin/events{/privacy}","received_events_url":"https://api.github.com/users/jasongin/received_events","type":"User","site_admin":false},"body":" - A simple cross-platform C++ node hosting interface: INodeEngine.h\r\n - Implementation of that interface using JXCore (though the intention is that non-JXCore implementations could be plugged in here just as well)\r\n - Adaptations of that interface to Android Java, iOS Obj-C, and Windows WinRT APIs\r\n - Metadata for building Cordova and Xamarin plugins from those APIs for the 3 platforms\r\n - Cordova and Xamarin functional test projects for the 3 platforms\r\n\r\nThe tool for generating the Cordova and Xamarin plugins is not published yet, though it should be soon. Until then, others won't be able to fully build this code.\r\n\r\nThe Xamarin tests are passing on all 3 platforms. The Cordova tests don't work yet because I need to fix some library-bundling issues in the plugin-generation tool. I'll work on that, but meanwhile I wanted to go ahead and share this PR.\r\n\r\nThis PR doesn't yet have any OpenT2T-specific functionality. I have some work on that pending, but not included here. I think it will be easier to review and merge just the node-hosting piece first, then build on top of it next.","created_at":"2016-07-15T07:07:58Z","updated_at":"2016-07-18T12:53:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d20a681a7fb62c23debbcaa14548528ebabca4fd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openT2T/client/pulls/1/commits","review_comments_url":"https://api.github.com/repos/openT2T/client/pulls/1/comments","review_comment_url":"https://api.github.com/repos/openT2T/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openT2T/client/issues/1/comments","statuses_url":"https://api.github.com/repos/openT2T/client/statuses/1877d56bc9676b50ddf65cb6176fbf2b4c24af12","head":{"label":"jasongin:develop","ref":"develop","sha":"1877d56bc9676b50ddf65cb6176fbf2b4c24af12","user":{"login":"jasongin","id":13093042,"avatar_url":"https://avatars.githubusercontent.com/u/13093042?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongin","html_url":"https://github.com/jasongin","followers_url":"https://api.github.com/users/jasongin/followers","following_url":"https://api.github.com/users/jasongin/following{/other_user}","gists_url":"https://api.github.com/users/jasongin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongin/subscriptions","organizations_url":"https://api.github.com/users/jasongin/orgs","repos_url":"https://api.github.com/users/jasongin/repos","events_url":"https://api.github.com/users/jasongin/events{/privacy}","received_events_url":"https://api.github.com/users/jasongin/received_events","type":"User","site_admin":false},"repo":{"id":62421216,"name":"opent2t-client","full_name":"jasongin/opent2t-client","owner":{"login":"jasongin","id":13093042,"avatar_url":"https://avatars.githubusercontent.com/u/13093042?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongin","html_url":"https://github.com/jasongin","followers_url":"https://api.github.com/users/jasongin/followers","following_url":"https://api.github.com/users/jasongin/following{/other_user}","gists_url":"https://api.github.com/users/jasongin/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongin/subscriptions","organizations_url":"https://api.github.com/users/jasongin/orgs","repos_url":"https://api.github.com/users/jasongin/repos","events_url":"https://api.github.com/users/jasongin/events{/privacy}","received_events_url":"https://api.github.com/users/jasongin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasongin/opent2t-client","description":"Multi-platform libraries for hosting OpenT2T in client applications","fork":true,"url":"https://api.github.com/repos/jasongin/opent2t-client","forks_url":"https://api.github.com/repos/jasongin/opent2t-client/forks","keys_url":"https://api.github.com/repos/jasongin/opent2t-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasongin/opent2t-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasongin/opent2t-client/teams","hooks_url":"https://api.github.com/repos/jasongin/opent2t-client/hooks","issue_events_url":"https://api.github.com/repos/jasongin/opent2t-client/issues/events{/number}","events_url":"https://api.github.com/repos/jasongin/opent2t-client/events","assignees_url":"https://api.github.com/repos/jasongin/opent2t-client/assignees{/user}","branches_url":"https://api.github.com/repos/jasongin/opent2t-client/branches{/branch}","tags_url":"https://api.github.com/repos/jasongin/opent2t-client/tags","blobs_url":"https://api.github.com/repos/jasongin/opent2t-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasongin/opent2t-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasongin/opent2t-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasongin/opent2t-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasongin/opent2t-client/statuses/{sha}","languages_url":"https://api.github.com/repos/jasongin/opent2t-client/languages","stargazers_url":"https://api.github.com/repos/jasongin/opent2t-client/stargazers","contributors_url":"https://api.github.com/repos/jasongin/opent2t-client/contributors","subscribers_url":"https://api.github.com/repos/jasongin/opent2t-client/subscribers","subscription_url":"https://api.github.com/repos/jasongin/opent2t-client/subscription","commits_url":"https://api.github.com/repos/jasongin/opent2t-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasongin/opent2t-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasongin/opent2t-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasongin/opent2t-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasongin/opent2t-client/contents/{+path}","compare_url":"https://api.github.com/repos/jasongin/opent2t-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasongin/opent2t-client/merges","archive_url":"https://api.github.com/repos/jasongin/opent2t-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasongin/opent2t-client/downloads","issues_url":"https://api.github.com/repos/jasongin/opent2t-client/issues{/number}","pulls_url":"https://api.github.com/repos/jasongin/opent2t-client/pulls{/number}","milestones_url":"https://api.github.com/repos/jasongin/opent2t-client/milestones{/number}","notifications_url":"https://api.github.com/repos/jasongin/opent2t-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasongin/opent2t-client/labels{/name}","releases_url":"https://api.github.com/repos/jasongin/opent2t-client/releases{/id}","deployments_url":"https://api.github.com/repos/jasongin/opent2t-client/deployments","created_at":"2016-07-01T21:41:58Z","updated_at":"2016-07-01T21:42:12Z","pushed_at":"2016-07-15T06:55:33Z","git_url":"git://github.com/jasongin/opent2t-client.git","ssh_url":"git@github.com:jasongin/opent2t-client.git","clone_url":"https://github.com/jasongin/opent2t-client.git","svn_url":"https://github.com/jasongin/opent2t-client","homepage":null,"size":344,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openT2T:master","ref":"master","sha":"99c7b5ab27b513901a8dfe4c303f8c2dd9eb2493","user":{"login":"openT2T","id":17659874,"avatar_url":"https://avatars.githubusercontent.com/u/17659874?v=3","gravatar_id":"","url":"https://api.github.com/users/openT2T","html_url":"https://github.com/openT2T","followers_url":"https://api.github.com/users/openT2T/followers","following_url":"https://api.github.com/users/openT2T/following{/other_user}","gists_url":"https://api.github.com/users/openT2T/gists{/gist_id}","starred_url":"https://api.github.com/users/openT2T/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openT2T/subscriptions","organizations_url":"https://api.github.com/users/openT2T/orgs","repos_url":"https://api.github.com/users/openT2T/repos","events_url":"https://api.github.com/users/openT2T/events{/privacy}","received_events_url":"https://api.github.com/users/openT2T/received_events","type":"Organization","site_admin":false},"repo":{"id":62420620,"name":"client","full_name":"openT2T/client","owner":{"login":"openT2T","id":17659874,"avatar_url":"https://avatars.githubusercontent.com/u/17659874?v=3","gravatar_id":"","url":"https://api.github.com/users/openT2T","html_url":"https://github.com/openT2T","followers_url":"https://api.github.com/users/openT2T/followers","following_url":"https://api.github.com/users/openT2T/following{/other_user}","gists_url":"https://api.github.com/users/openT2T/gists{/gist_id}","starred_url":"https://api.github.com/users/openT2T/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openT2T/subscriptions","organizations_url":"https://api.github.com/users/openT2T/orgs","repos_url":"https://api.github.com/users/openT2T/repos","events_url":"https://api.github.com/users/openT2T/events{/privacy}","received_events_url":"https://api.github.com/users/openT2T/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openT2T/client","description":"Multi-platform libraries for hosting OpenT2T in client applications","fork":false,"url":"https://api.github.com/repos/openT2T/client","forks_url":"https://api.github.com/repos/openT2T/client/forks","keys_url":"https://api.github.com/repos/openT2T/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openT2T/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openT2T/client/teams","hooks_url":"https://api.github.com/repos/openT2T/client/hooks","issue_events_url":"https://api.github.com/repos/openT2T/client/issues/events{/number}","events_url":"https://api.github.com/repos/openT2T/client/events","assignees_url":"https://api.github.com/repos/openT2T/client/assignees{/user}","branches_url":"https://api.github.com/repos/openT2T/client/branches{/branch}","tags_url":"https://api.github.com/repos/openT2T/client/tags","blobs_url":"https://api.github.com/repos/openT2T/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openT2T/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openT2T/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/openT2T/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openT2T/client/statuses/{sha}","languages_url":"https://api.github.com/repos/openT2T/client/languages","stargazers_url":"https://api.github.com/repos/openT2T/client/stargazers","contributors_url":"https://api.github.com/repos/openT2T/client/contributors","subscribers_url":"https://api.github.com/repos/openT2T/client/subscribers","subscription_url":"https://api.github.com/repos/openT2T/client/subscription","commits_url":"https://api.github.com/repos/openT2T/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/openT2T/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/openT2T/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/openT2T/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/openT2T/client/contents/{+path}","compare_url":"https://api.github.com/repos/openT2T/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openT2T/client/merges","archive_url":"https://api.github.com/repos/openT2T/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openT2T/client/downloads","issues_url":"https://api.github.com/repos/openT2T/client/issues{/number}","pulls_url":"https://api.github.com/repos/openT2T/client/pulls{/number}","milestones_url":"https://api.github.com/repos/openT2T/client/milestones{/number}","notifications_url":"https://api.github.com/repos/openT2T/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openT2T/client/labels{/name}","releases_url":"https://api.github.com/repos/openT2T/client/releases{/id}","deployments_url":"https://api.github.com/repos/openT2T/client/deployments","created_at":"2016-07-01T21:27:39Z","updated_at":"2016-07-01T21:27:39Z","pushed_at":"2016-07-15T07:07:58Z","git_url":"git://github.com/openT2T/client.git","ssh_url":"git@github.com:openT2T/client.git","clone_url":"https://github.com/openT2T/client.git","svn_url":"https://github.com/openT2T/client","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openT2T/client/pulls/1"},"html":{"href":"https://github.com/openT2T/client/pull/1"},"issue":{"href":"https://api.github.com/repos/openT2T/client/issues/1"},"comments":{"href":"https://api.github.com/repos/openT2T/client/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/openT2T/client/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/openT2T/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openT2T/client/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/openT2T/client/statuses/1877d56bc9676b50ddf65cb6176fbf2b4c24af12"}}}}
{"actor":{"display_login":"obastemur"}}