{"action":"created","comment":{"url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/comments/67563206","id":67563206,"diff_hunk":"@@ -104,7 +105,11 @@ void Extract::HasTable(const FunctionCallbackInfo<Value>& args) {\n }\n \n void Extract::AddTable(const FunctionCallbackInfo<Value>& args) {\n-  NodeTde::Table::NewInstanceFromDefinition(args);\n+  try {\n+    NodeTde::Table::NewInstanceFromDefinition(args);\n+  } catch (const Tableau::TableauException& e) {\n+    THROW_TABLEAU_EXCEPTION(e);","path":"src/TableauExtract.cc","position":15,"original_position":15,"commit_id":"1cda6ca8a5e4551b6503ac96eb3e307d0533d860","original_commit_id":"1cda6ca8a5e4551b6503ac96eb3e307d0533d860","user":{"login":"iamEAP","id":3496491,"avatar_url":"https://avatars.githubusercontent.com/u/3496491?v=3","gravatar_id":"","url":"https://api.github.com/users/iamEAP","html_url":"https://github.com/iamEAP","followers_url":"https://api.github.com/users/iamEAP/followers","following_url":"https://api.github.com/users/iamEAP/following{/other_user}","gists_url":"https://api.github.com/users/iamEAP/gists{/gist_id}","starred_url":"https://api.github.com/users/iamEAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamEAP/subscriptions","organizations_url":"https://api.github.com/users/iamEAP/orgs","repos_url":"https://api.github.com/users/iamEAP/repos","events_url":"https://api.github.com/users/iamEAP/events{/privacy}","received_events_url":"https://api.github.com/users/iamEAP/received_events","type":"User","site_admin":false},"body":"A quick test for this would be nice.  Something like...\r\n\r\n```javascript\r\nvar expect = chai.expect;\r\n// ...\r\nit('throws error when adding invalid table name', function () {\r\n  // Create an extract.\r\n  expectedPath = targetDir + '/mocha-add-invalid-table.tde';\r\n  extract = tableau.dataExtract(expectedPath);\r\n\r\n  // Create a table definition.\r\n  tableDef = tableau.tableDefinition();\r\n  tableDef.addColumn('Column', tableau.enums.type('Boolean'));\r\n\r\n  // Attempt to add a table with a name other than Extract.\r\n  expect(extract.addTable.bind(extract, 'Invalid', tableDef))\r\n    .to.throw();\r\n});\r\n```","created_at":"2016-06-17T19:29:46Z","updated_at":"2016-06-17T19:29:46Z","html_url":"https://github.com/tableau-mkt/node-tableau-sdk/pull/6#discussion_r67563206","pull_request_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/comments/67563206"},"html":{"href":"https://github.com/tableau-mkt/node-tableau-sdk/pull/6#discussion_r67563206"},"pull_request":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6","id":74209328,"html_url":"https://github.com/tableau-mkt/node-tableau-sdk/pull/6","diff_url":"https://github.com/tableau-mkt/node-tableau-sdk/pull/6.diff","patch_url":"https://github.com/tableau-mkt/node-tableau-sdk/pull/6.patch","issue_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/issues/6","number":6,"state":"open","locked":false,"title":"You cannot change the Table name other than \"Extract\".","user":{"login":"tfoldi","id":82426,"avatar_url":"https://avatars.githubusercontent.com/u/82426?v=3","gravatar_id":"","url":"https://api.github.com/users/tfoldi","html_url":"https://github.com/tfoldi","followers_url":"https://api.github.com/users/tfoldi/followers","following_url":"https://api.github.com/users/tfoldi/following{/other_user}","gists_url":"https://api.github.com/users/tfoldi/gists{/gist_id}","starred_url":"https://api.github.com/users/tfoldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfoldi/subscriptions","organizations_url":"https://api.github.com/users/tfoldi/orgs","repos_url":"https://api.github.com/users/tfoldi/repos","events_url":"https://api.github.com/users/tfoldi/events{/privacy}","received_events_url":"https://api.github.com/users/tfoldi/received_events","type":"User","site_admin":false},"body":"Tableau API is so dumb that if you are using Table name other that `Extract` it will throw an exception. Since you do not manage exceptions other than in the server part it just crashes the complete v8 engine if you try something else.\r\n\r\nWhen I have time I will add some exception handling to `TableauExtract.cc` but fixing the docs would be the very first step","created_at":"2016-06-17T08:57:02Z","updated_at":"2016-06-17T19:29:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d72999ad81aa0935d60e1bd84851c7df4a88a392","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6/commits","review_comments_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6/comments","review_comment_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/issues/6/comments","statuses_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/statuses/1cda6ca8a5e4551b6503ac96eb3e307d0533d860","head":{"label":"tfoldi:master","ref":"master","sha":"1cda6ca8a5e4551b6503ac96eb3e307d0533d860","user":{"login":"tfoldi","id":82426,"avatar_url":"https://avatars.githubusercontent.com/u/82426?v=3","gravatar_id":"","url":"https://api.github.com/users/tfoldi","html_url":"https://github.com/tfoldi","followers_url":"https://api.github.com/users/tfoldi/followers","following_url":"https://api.github.com/users/tfoldi/following{/other_user}","gists_url":"https://api.github.com/users/tfoldi/gists{/gist_id}","starred_url":"https://api.github.com/users/tfoldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfoldi/subscriptions","organizations_url":"https://api.github.com/users/tfoldi/orgs","repos_url":"https://api.github.com/users/tfoldi/repos","events_url":"https://api.github.com/users/tfoldi/events{/privacy}","received_events_url":"https://api.github.com/users/tfoldi/received_events","type":"User","site_admin":false},"repo":{"id":61356885,"name":"node-tableau-sdk","full_name":"tfoldi/node-tableau-sdk","owner":{"login":"tfoldi","id":82426,"avatar_url":"https://avatars.githubusercontent.com/u/82426?v=3","gravatar_id":"","url":"https://api.github.com/users/tfoldi","html_url":"https://github.com/tfoldi","followers_url":"https://api.github.com/users/tfoldi/followers","following_url":"https://api.github.com/users/tfoldi/following{/other_user}","gists_url":"https://api.github.com/users/tfoldi/gists{/gist_id}","starred_url":"https://api.github.com/users/tfoldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfoldi/subscriptions","organizations_url":"https://api.github.com/users/tfoldi/orgs","repos_url":"https://api.github.com/users/tfoldi/repos","events_url":"https://api.github.com/users/tfoldi/events{/privacy}","received_events_url":"https://api.github.com/users/tfoldi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tfoldi/node-tableau-sdk","description":"Unofficial Node.js port of the Tableau SDK (TDE + Server APIs).","fork":true,"url":"https://api.github.com/repos/tfoldi/node-tableau-sdk","forks_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/forks","keys_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/teams","hooks_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/hooks","issue_events_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/events","assignees_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/tags","blobs_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/languages","stargazers_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/stargazers","contributors_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/contributors","subscribers_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/subscribers","subscription_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/subscription","commits_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/merges","archive_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/downloads","issues_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/labels{/name}","releases_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/tfoldi/node-tableau-sdk/deployments","created_at":"2016-06-17T08:07:07Z","updated_at":"2016-06-17T08:07:08Z","pushed_at":"2016-06-17T09:01:52Z","git_url":"git://github.com/tfoldi/node-tableau-sdk.git","ssh_url":"git@github.com:tfoldi/node-tableau-sdk.git","clone_url":"https://github.com/tfoldi/node-tableau-sdk.git","svn_url":"https://github.com/tfoldi/node-tableau-sdk","homepage":"https://www.npmjs.com/package/tableau-sdk","size":25,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"tableau-mkt:master","ref":"master","sha":"56f79b13322057f6c690bbb2f3efb68020b0d607","user":{"login":"tableau-mkt","id":6118363,"avatar_url":"https://avatars.githubusercontent.com/u/6118363?v=3","gravatar_id":"","url":"https://api.github.com/users/tableau-mkt","html_url":"https://github.com/tableau-mkt","followers_url":"https://api.github.com/users/tableau-mkt/followers","following_url":"https://api.github.com/users/tableau-mkt/following{/other_user}","gists_url":"https://api.github.com/users/tableau-mkt/gists{/gist_id}","starred_url":"https://api.github.com/users/tableau-mkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tableau-mkt/subscriptions","organizations_url":"https://api.github.com/users/tableau-mkt/orgs","repos_url":"https://api.github.com/users/tableau-mkt/repos","events_url":"https://api.github.com/users/tableau-mkt/events{/privacy}","received_events_url":"https://api.github.com/users/tableau-mkt/received_events","type":"Organization","site_admin":false},"repo":{"id":56528190,"name":"node-tableau-sdk","full_name":"tableau-mkt/node-tableau-sdk","owner":{"login":"tableau-mkt","id":6118363,"avatar_url":"https://avatars.githubusercontent.com/u/6118363?v=3","gravatar_id":"","url":"https://api.github.com/users/tableau-mkt","html_url":"https://github.com/tableau-mkt","followers_url":"https://api.github.com/users/tableau-mkt/followers","following_url":"https://api.github.com/users/tableau-mkt/following{/other_user}","gists_url":"https://api.github.com/users/tableau-mkt/gists{/gist_id}","starred_url":"https://api.github.com/users/tableau-mkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tableau-mkt/subscriptions","organizations_url":"https://api.github.com/users/tableau-mkt/orgs","repos_url":"https://api.github.com/users/tableau-mkt/repos","events_url":"https://api.github.com/users/tableau-mkt/events{/privacy}","received_events_url":"https://api.github.com/users/tableau-mkt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tableau-mkt/node-tableau-sdk","description":"Unofficial Node.js port of the Tableau SDK (TDE + Server APIs).","fork":false,"url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk","forks_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/forks","keys_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/teams","hooks_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/hooks","issue_events_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/events","assignees_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/tags","blobs_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/languages","stargazers_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/stargazers","contributors_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/contributors","subscribers_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/subscribers","subscription_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/subscription","commits_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/merges","archive_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/downloads","issues_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/labels{/name}","releases_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/deployments","created_at":"2016-04-18T17:34:51Z","updated_at":"2016-04-24T00:19:39Z","pushed_at":"2016-06-17T19:13:53Z","git_url":"git://github.com/tableau-mkt/node-tableau-sdk.git","ssh_url":"git@github.com:tableau-mkt/node-tableau-sdk.git","clone_url":"https://github.com/tableau-mkt/node-tableau-sdk.git","svn_url":"https://github.com/tableau-mkt/node-tableau-sdk","homepage":"https://www.npmjs.com/package/tableau-sdk","size":27,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6"},"html":{"href":"https://github.com/tableau-mkt/node-tableau-sdk/pull/6"},"issue":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/issues/6"},"comments":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/tableau-mkt/node-tableau-sdk/statuses/1cda6ca8a5e4551b6503ac96eb3e307d0533d860"}}}}
{"actor":{"display_login":"iamEAP"}}