{"action":"created","comment":{"url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments/345496428","pull_request_review_id":315902582,"id":345496428,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0NTQ5NjQyOA==","diff_hunk":"@@ -60,30 +59,25 @@ public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, Html\n         }\n         public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, HtmlHelper html, string propertyAlias)\n         {\n-            if (string.IsNullOrWhiteSpace(propertyAlias)) throw new ArgumentNullOrEmptyException(nameof(propertyAlias));\n+            if (propertyAlias == null) throw new ArgumentNullException(nameof(propertyAlias));\n+            if (string.IsNullOrWhiteSpace(propertyAlias)) throw new ArgumentException(\"Value can't be empty or consist only of white-space characters.\", nameof(propertyAlias));\n \n             return GetGridHtml(contentItem, html, propertyAlias, \"bootstrap3\");\n         }\n         public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, HtmlHelper html, string propertyAlias, string framework)\n         {\n-            if (string.IsNullOrWhiteSpace(propertyAlias)) throw new ArgumentNullOrEmptyException(nameof(propertyAlias));\n+            if (propertyAlias == null) throw new ArgumentNullException(nameof(propertyAlias));\n+            if (string.IsNullOrWhiteSpace(propertyAlias)) throw new ArgumentException(\"Value can't be empty or consist only of white-space characters.\", nameof(propertyAlias));\n \n             var view = \"Grid/\" + framework;\n             var prop = contentItem.GetProperty(propertyAlias);\n-            if (prop == null) throw new NullReferenceException(\"No property type found with alias \" + propertyAlias);\n+            if (prop == null) throw new NullReferenceException(\"No property type found with alias \" + propertyAlias); // TODO NullReferenceException should not be thrown by user code","path":"src/Umbraco.Web/GridTemplateExtensions.cs","position":58,"original_position":58,"commit_id":"71f3bbfb19fab84d83e9014e1a6132405d4b6e6a","original_commit_id":"71f3bbfb19fab84d83e9014e1a6132405d4b6e6a","user":{"login":"Shazwazza","id":1742685,"node_id":"MDQ6VXNlcjE3NDI2ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/1742685?v=4","gravatar_id":"","url":"https://api.github.com/users/Shazwazza","html_url":"https://github.com/Shazwazza","followers_url":"https://api.github.com/users/Shazwazza/followers","following_url":"https://api.github.com/users/Shazwazza/following{/other_user}","gists_url":"https://api.github.com/users/Shazwazza/gists{/gist_id}","starred_url":"https://api.github.com/users/Shazwazza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shazwazza/subscriptions","organizations_url":"https://api.github.com/users/Shazwazza/orgs","repos_url":"https://api.github.com/users/Shazwazza/repos","events_url":"https://api.github.com/users/Shazwazza/events{/privacy}","received_events_url":"https://api.github.com/users/Shazwazza/received_events","type":"User","site_admin":false},"body":"indeed","created_at":"2019-11-12T23:15:07Z","updated_at":"2019-11-12T23:21:17Z","html_url":"https://github.com/umbraco/Umbraco-CMS/pull/6599#discussion_r345496428","pull_request_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments/345496428"},"html":{"href":"https://github.com/umbraco/Umbraco-CMS/pull/6599#discussion_r345496428"},"pull_request":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599"}},"in_reply_to_id":332227731},"pull_request":{"url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599","id":325479090,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI1NDc5MDkw","html_url":"https://github.com/umbraco/Umbraco-CMS/pull/6599","diff_url":"https://github.com/umbraco/Umbraco-CMS/pull/6599.diff","patch_url":"https://github.com/umbraco/Umbraco-CMS/pull/6599.patch","issue_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/6599","number":6599,"state":"open","locked":false,"title":"Fixed and cleaned up custom exception classes","user":{"login":"ronaldbarendse","id":1051287,"node_id":"MDQ6VXNlcjEwNTEyODc=","avatar_url":"https://avatars2.githubusercontent.com/u/1051287?v=4","gravatar_id":"","url":"https://api.github.com/users/ronaldbarendse","html_url":"https://github.com/ronaldbarendse","followers_url":"https://api.github.com/users/ronaldbarendse/followers","following_url":"https://api.github.com/users/ronaldbarendse/following{/other_user}","gists_url":"https://api.github.com/users/ronaldbarendse/gists{/gist_id}","starred_url":"https://api.github.com/users/ronaldbarendse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronaldbarendse/subscriptions","organizations_url":"https://api.github.com/users/ronaldbarendse/orgs","repos_url":"https://api.github.com/users/ronaldbarendse/repos","events_url":"https://api.github.com/users/ronaldbarendse/events{/privacy}","received_events_url":"https://api.github.com/users/ronaldbarendse/received_events","type":"User","site_admin":false},"body":"### Prerequisites\r\n\r\n- [x] I have added steps to test this contribution in the description below\r\n\r\nIf there's an existing issue for this PR then this fixes https://github.com/umbraco/Umbraco-CMS/issues/5947 (this is a rewrite of PR https://github.com/umbraco/Umbraco-CMS/pull/5950).\r\n\r\n### Description\r\nAll custom `Exception` classes shoud be updated with:\r\n- `[Serializable]` attribute (as any class that might be serialized must be marked with this attribute)\r\n- Constructor with the signature `(SerializationInfo information, StreamingContext context)` (as required for all classes that implement `ISerializable`)\r\n- If custom properties are added, restore the data in the above constructor and override `GetObjectData(SerializationInfo info, StreamingContext context)` to save the data\r\n\r\nWhile going through all custom exceptions, a lot of them could be cleaned up (by throwing framework exceptions instead). I've kept the exception classes to keep backwards-compatibility, at least at a binary-level. This could be marked as a functional breaking-change, as implementing code could depend on catching a specific exception.\r\n\r\n---\r\n_This item has been added to our backlog [AB#3410](https://umbraco.visualstudio.com/243e7927-03b2-44e2-908f-d4ac7ea5daaa/_workitems/edit/3410)_","created_at":"2019-10-07T20:26:26Z","updated_at":"2019-11-12T23:21:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df6e1df19786d841413f5a002bc42a0a93bb5f32","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1040134486,"node_id":"MDU6TGFiZWwxMDQwMTM0NDg2","url":"https://api.github.com/repos/umbraco/Umbraco-CMS/labels/state/sprint-backlog","name":"state/sprint-backlog","color":"eaf0f7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599/commits","review_comments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599/comments","review_comment_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/6599/comments","statuses_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/statuses/71f3bbfb19fab84d83e9014e1a6132405d4b6e6a","head":{"label":"ronaldbarendse:v8/bugfix/5947-custom-exceptions","ref":"v8/bugfix/5947-custom-exceptions","sha":"71f3bbfb19fab84d83e9014e1a6132405d4b6e6a","user":{"login":"ronaldbarendse","id":1051287,"node_id":"MDQ6VXNlcjEwNTEyODc=","avatar_url":"https://avatars2.githubusercontent.com/u/1051287?v=4","gravatar_id":"","url":"https://api.github.com/users/ronaldbarendse","html_url":"https://github.com/ronaldbarendse","followers_url":"https://api.github.com/users/ronaldbarendse/followers","following_url":"https://api.github.com/users/ronaldbarendse/following{/other_user}","gists_url":"https://api.github.com/users/ronaldbarendse/gists{/gist_id}","starred_url":"https://api.github.com/users/ronaldbarendse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronaldbarendse/subscriptions","organizations_url":"https://api.github.com/users/ronaldbarendse/orgs","repos_url":"https://api.github.com/users/ronaldbarendse/repos","events_url":"https://api.github.com/users/ronaldbarendse/events{/privacy}","received_events_url":"https://api.github.com/users/ronaldbarendse/received_events","type":"User","site_admin":false},"repo":{"id":99511987,"node_id":"MDEwOlJlcG9zaXRvcnk5OTUxMTk4Nw==","name":"Umbraco-CMS","full_name":"ronaldbarendse/Umbraco-CMS","private":false,"owner":{"login":"ronaldbarendse","id":1051287,"node_id":"MDQ6VXNlcjEwNTEyODc=","avatar_url":"https://avatars2.githubusercontent.com/u/1051287?v=4","gravatar_id":"","url":"https://api.github.com/users/ronaldbarendse","html_url":"https://github.com/ronaldbarendse","followers_url":"https://api.github.com/users/ronaldbarendse/followers","following_url":"https://api.github.com/users/ronaldbarendse/following{/other_user}","gists_url":"https://api.github.com/users/ronaldbarendse/gists{/gist_id}","starred_url":"https://api.github.com/users/ronaldbarendse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronaldbarendse/subscriptions","organizations_url":"https://api.github.com/users/ronaldbarendse/orgs","repos_url":"https://api.github.com/users/ronaldbarendse/repos","events_url":"https://api.github.com/users/ronaldbarendse/events{/privacy}","received_events_url":"https://api.github.com/users/ronaldbarendse/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ronaldbarendse/Umbraco-CMS","description":"The simple, flexible and friendly ASP.NET CMS used by more than 400.000 websites","fork":true,"url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS","forks_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/forks","keys_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/teams","hooks_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/hooks","issue_events_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/issues/events{/number}","events_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/events","assignees_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/assignees{/user}","branches_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/branches{/branch}","tags_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/tags","blobs_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/statuses/{sha}","languages_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/languages","stargazers_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/stargazers","contributors_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/contributors","subscribers_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/subscribers","subscription_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/subscription","commits_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/contents/{+path}","compare_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/merges","archive_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/downloads","issues_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/issues{/number}","pulls_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/pulls{/number}","milestones_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/milestones{/number}","notifications_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/labels{/name}","releases_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/releases{/id}","deployments_url":"https://api.github.com/repos/ronaldbarendse/Umbraco-CMS/deployments","created_at":"2017-08-06T20:36:06Z","updated_at":"2019-05-25T12:39:53Z","pushed_at":"2019-11-01T21:59:09Z","git_url":"git://github.com/ronaldbarendse/Umbraco-CMS.git","ssh_url":"git@github.com:ronaldbarendse/Umbraco-CMS.git","clone_url":"https://github.com/ronaldbarendse/Umbraco-CMS.git","svn_url":"https://github.com/ronaldbarendse/Umbraco-CMS","homepage":"http://umbraco.com","size":180987,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"v7/dev"}},"base":{"label":"umbraco:v8/dev","ref":"v8/dev","sha":"0e4727f5df4d8979be18eef905fd277d534414f2","user":{"login":"umbraco","id":1419552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTk1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1419552?v=4","gravatar_id":"","url":"https://api.github.com/users/umbraco","html_url":"https://github.com/umbraco","followers_url":"https://api.github.com/users/umbraco/followers","following_url":"https://api.github.com/users/umbraco/following{/other_user}","gists_url":"https://api.github.com/users/umbraco/gists{/gist_id}","starred_url":"https://api.github.com/users/umbraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbraco/subscriptions","organizations_url":"https://api.github.com/users/umbraco/orgs","repos_url":"https://api.github.com/users/umbraco/repos","events_url":"https://api.github.com/users/umbraco/events{/privacy}","received_events_url":"https://api.github.com/users/umbraco/received_events","type":"Organization","site_admin":false},"repo":{"id":10601208,"node_id":"MDEwOlJlcG9zaXRvcnkxMDYwMTIwOA==","name":"Umbraco-CMS","full_name":"umbraco/Umbraco-CMS","private":false,"owner":{"login":"umbraco","id":1419552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTk1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1419552?v=4","gravatar_id":"","url":"https://api.github.com/users/umbraco","html_url":"https://github.com/umbraco","followers_url":"https://api.github.com/users/umbraco/followers","following_url":"https://api.github.com/users/umbraco/following{/other_user}","gists_url":"https://api.github.com/users/umbraco/gists{/gist_id}","starred_url":"https://api.github.com/users/umbraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbraco/subscriptions","organizations_url":"https://api.github.com/users/umbraco/orgs","repos_url":"https://api.github.com/users/umbraco/repos","events_url":"https://api.github.com/users/umbraco/events{/privacy}","received_events_url":"https://api.github.com/users/umbraco/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/umbraco/Umbraco-CMS","description":"The simple, flexible and friendly ASP.NET CMS used by more than 500.000 websites","fork":false,"url":"https://api.github.com/repos/umbraco/Umbraco-CMS","forks_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/forks","keys_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/teams","hooks_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/hooks","issue_events_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/events{/number}","events_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/events","assignees_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/assignees{/user}","branches_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/branches{/branch}","tags_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/tags","blobs_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/statuses/{sha}","languages_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/languages","stargazers_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/stargazers","contributors_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/contributors","subscribers_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/subscribers","subscription_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/subscription","commits_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/contents/{+path}","compare_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/merges","archive_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/downloads","issues_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues{/number}","pulls_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls{/number}","milestones_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/milestones{/number}","notifications_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/labels{/name}","releases_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/releases{/id}","deployments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/deployments","created_at":"2013-06-10T13:50:46Z","updated_at":"2019-11-12T22:47:11Z","pushed_at":"2019-11-12T22:21:57Z","git_url":"git://github.com/umbraco/Umbraco-CMS.git","ssh_url":"git@github.com:umbraco/Umbraco-CMS.git","clone_url":"https://github.com/umbraco/Umbraco-CMS.git","svn_url":"https://github.com/umbraco/Umbraco-CMS","homepage":"https://umbraco.com","size":184240,"stargazers_count":2774,"watchers_count":2774,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1963,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":681,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1963,"open_issues":681,"watchers":2774,"default_branch":"v8/dev"}},"_links":{"self":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599"},"html":{"href":"https://github.com/umbraco/Umbraco-CMS/pull/6599"},"issue":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/6599"},"comments":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/6599/comments"},"review_comments":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599/comments"},"review_comment":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/6599/commits"},"statuses":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/statuses/71f3bbfb19fab84d83e9014e1a6132405d4b6e6a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Shazwazza"}}