{"action":"created","comment":{"url":"https://api.github.com/repos/zotonic/zotonic/pulls/comments/89307944","pull_request_review_id":9853411,"id":89307944,"diff_hunk":"@@ -104,31 +104,17 @@ render_block(OptBlock, Template, Vars, Context) when is_map(Vars) ->\n     case Result of\n         {ok, Output} ->\n             Output;\n-        {error, {{ErrFile,Line,Col}, _YeccModule, Error}} ->\n-            try\n-                Error1 = iolist_to_binary(Error),\n-                lager:error(\"[~p] Error rendering template: ~s:~p (~s)~n\",\n-                           [z_context:site(Context), ErrFile, Line, Col, Error1])\n-            catch\n-                _:_ ->\n-                    lager:error(\"[~p] Error rendering template: ~s:~p (~p)~n\",\n-                               [z_context:site(Context), ErrFile, Line, Col, Error])\n-            end,\n+        {error, {{ErrFile, Line, Col}, _YeccModule, Error}} ->\n+            lager:error(\n+                \"Error rendering template ~s:~p:~p due to ~s ~n\",\n+                [ErrFile, Line, Col, Error]\n+            ),\n             <<>>;\n         {error, Reason} when is_list(Reason); is_binary(Reason) ->\n-            try\n-                Reason1 = iolist_to_binary(Reason),\n-                lager:error(\"[~p] Error rendering template: ~s (~s)~n\",\n-                           [z_context:site(Context), Template, Reason1])\n-            catch","path":"src/support/z_template.erl","position":25,"original_position":25,"commit_id":"71ca79d47b6105b654624a751b9b3a4215f71662","original_commit_id":"71ca79d47b6105b654624a751b9b3a4215f71662","user":{"login":"ddeboer","id":89267,"avatar_url":"https://avatars.githubusercontent.com/u/89267?v=3","gravatar_id":"","url":"https://api.github.com/users/ddeboer","html_url":"https://github.com/ddeboer","followers_url":"https://api.github.com/users/ddeboer/followers","following_url":"https://api.github.com/users/ddeboer/following{/other_user}","gists_url":"https://api.github.com/users/ddeboer/gists{/gist_id}","starred_url":"https://api.github.com/users/ddeboer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddeboer/subscriptions","organizations_url":"https://api.github.com/users/ddeboer/orgs","repos_url":"https://api.github.com/users/ddeboer/repos","events_url":"https://api.github.com/users/ddeboer/events{/privacy}","received_events_url":"https://api.github.com/users/ddeboer/received_events","type":"User","site_admin":false},"body":"What if we replace `iolist_to_binary` with `z_convert:to_binary` (which works on other types as well)?","created_at":"2016-11-23T12:41:19Z","updated_at":"2016-11-23T12:41:19Z","html_url":"https://github.com/zotonic/zotonic/pull/1534#discussion_r89307944","pull_request_url":"https://api.github.com/repos/zotonic/zotonic/pulls/1534","_links":{"self":{"href":"https://api.github.com/repos/zotonic/zotonic/pulls/comments/89307944"},"html":{"href":"https://github.com/zotonic/zotonic/pull/1534#discussion_r89307944"},"pull_request":{"href":"https://api.github.com/repos/zotonic/zotonic/pulls/1534"}}},"pull_request":{"url":"https://api.github.com/repos/zotonic/zotonic/pulls/1534","id":94987626,"html_url":"https://github.com/zotonic/zotonic/pull/1534","diff_url":"https://github.com/zotonic/zotonic/pull/1534.diff","patch_url":"https://github.com/zotonic/zotonic/pull/1534.patch","issue_url":"https://api.github.com/repos/zotonic/zotonic/issues/1534","number":1534,"state":"open","locked":false,"title":"core: Fix template render error logging","user":{"login":"ddeboer","id":89267,"avatar_url":"https://avatars.githubusercontent.com/u/89267?v=3","gravatar_id":"","url":"https://api.github.com/users/ddeboer","html_url":"https://github.com/ddeboer","followers_url":"https://api.github.com/users/ddeboer/followers","following_url":"https://api.github.com/users/ddeboer/following{/other_user}","gists_url":"https://api.github.com/users/ddeboer/gists{/gist_id}","starred_url":"https://api.github.com/users/ddeboer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddeboer/subscriptions","organizations_url":"https://api.github.com/users/ddeboer/orgs","repos_url":"https://api.github.com/users/ddeboer/repos","events_url":"https://api.github.com/users/ddeboer/events{/privacy}","received_events_url":"https://api.github.com/users/ddeboer/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\n- Fix `lager:error` calls throwing a `FORMAT ERROR` due to invalid number of parameters.\r\n- Remove site name from log messages (see also #1510).\r\n\r\n### Checklist\r\n\r\n- [x] no BC breaks\r\n","created_at":"2016-11-23T11:43:38Z","updated_at":"2016-11-23T12:41:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f1d344f31cd16e26b78bbb87300e040689376f7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zotonic/zotonic/pulls/1534/commits","review_comments_url":"https://api.github.com/repos/zotonic/zotonic/pulls/1534/comments","review_comment_url":"https://api.github.com/repos/zotonic/zotonic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zotonic/zotonic/issues/1534/comments","statuses_url":"https://api.github.com/repos/zotonic/zotonic/statuses/71ca79d47b6105b654624a751b9b3a4215f71662","head":{"label":"zotonic:fix-template-render-error","ref":"fix-template-render-error","sha":"71ca79d47b6105b654624a751b9b3a4215f71662","user":{"login":"zotonic","id":829753,"avatar_url":"https://avatars.githubusercontent.com/u/829753?v=3","gravatar_id":"","url":"https://api.github.com/users/zotonic","html_url":"https://github.com/zotonic","followers_url":"https://api.github.com/users/zotonic/followers","following_url":"https://api.github.com/users/zotonic/following{/other_user}","gists_url":"https://api.github.com/users/zotonic/gists{/gist_id}","starred_url":"https://api.github.com/users/zotonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotonic/subscriptions","organizations_url":"https://api.github.com/users/zotonic/orgs","repos_url":"https://api.github.com/users/zotonic/repos","events_url":"https://api.github.com/users/zotonic/events{/privacy}","received_events_url":"https://api.github.com/users/zotonic/received_events","type":"Organization","site_admin":false},"repo":{"id":1847706,"name":"zotonic","full_name":"zotonic/zotonic","owner":{"login":"zotonic","id":829753,"avatar_url":"https://avatars.githubusercontent.com/u/829753?v=3","gravatar_id":"","url":"https://api.github.com/users/zotonic","html_url":"https://github.com/zotonic","followers_url":"https://api.github.com/users/zotonic/followers","following_url":"https://api.github.com/users/zotonic/following{/other_user}","gists_url":"https://api.github.com/users/zotonic/gists{/gist_id}","starred_url":"https://api.github.com/users/zotonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotonic/subscriptions","organizations_url":"https://api.github.com/users/zotonic/orgs","repos_url":"https://api.github.com/users/zotonic/repos","events_url":"https://api.github.com/users/zotonic/events{/privacy}","received_events_url":"https://api.github.com/users/zotonic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zotonic/zotonic","description":"Zotonic - The Erlang Web Framework & CMS","fork":false,"url":"https://api.github.com/repos/zotonic/zotonic","forks_url":"https://api.github.com/repos/zotonic/zotonic/forks","keys_url":"https://api.github.com/repos/zotonic/zotonic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zotonic/zotonic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zotonic/zotonic/teams","hooks_url":"https://api.github.com/repos/zotonic/zotonic/hooks","issue_events_url":"https://api.github.com/repos/zotonic/zotonic/issues/events{/number}","events_url":"https://api.github.com/repos/zotonic/zotonic/events","assignees_url":"https://api.github.com/repos/zotonic/zotonic/assignees{/user}","branches_url":"https://api.github.com/repos/zotonic/zotonic/branches{/branch}","tags_url":"https://api.github.com/repos/zotonic/zotonic/tags","blobs_url":"https://api.github.com/repos/zotonic/zotonic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zotonic/zotonic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zotonic/zotonic/git/refs{/sha}","trees_url":"https://api.github.com/repos/zotonic/zotonic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zotonic/zotonic/statuses/{sha}","languages_url":"https://api.github.com/repos/zotonic/zotonic/languages","stargazers_url":"https://api.github.com/repos/zotonic/zotonic/stargazers","contributors_url":"https://api.github.com/repos/zotonic/zotonic/contributors","subscribers_url":"https://api.github.com/repos/zotonic/zotonic/subscribers","subscription_url":"https://api.github.com/repos/zotonic/zotonic/subscription","commits_url":"https://api.github.com/repos/zotonic/zotonic/commits{/sha}","git_commits_url":"https://api.github.com/repos/zotonic/zotonic/git/commits{/sha}","comments_url":"https://api.github.com/repos/zotonic/zotonic/comments{/number}","issue_comment_url":"https://api.github.com/repos/zotonic/zotonic/issues/comments{/number}","contents_url":"https://api.github.com/repos/zotonic/zotonic/contents/{+path}","compare_url":"https://api.github.com/repos/zotonic/zotonic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zotonic/zotonic/merges","archive_url":"https://api.github.com/repos/zotonic/zotonic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zotonic/zotonic/downloads","issues_url":"https://api.github.com/repos/zotonic/zotonic/issues{/number}","pulls_url":"https://api.github.com/repos/zotonic/zotonic/pulls{/number}","milestones_url":"https://api.github.com/repos/zotonic/zotonic/milestones{/number}","notifications_url":"https://api.github.com/repos/zotonic/zotonic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zotonic/zotonic/labels{/name}","releases_url":"https://api.github.com/repos/zotonic/zotonic/releases{/id}","deployments_url":"https://api.github.com/repos/zotonic/zotonic/deployments","created_at":"2011-06-04T18:43:30Z","updated_at":"2016-11-22T14:41:41Z","pushed_at":"2016-11-23T11:57:19Z","git_url":"git://github.com/zotonic/zotonic.git","ssh_url":"git@github.com:zotonic/zotonic.git","clone_url":"https://github.com/zotonic/zotonic.git","svn_url":"https://github.com/zotonic/zotonic","homepage":"http://zotonic.com/","size":51884,"stargazers_count":471,"watchers_count":471,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":149,"mirror_url":null,"open_issues_count":200,"forks":149,"open_issues":200,"watchers":471,"default_branch":"master"}},"base":{"label":"zotonic:master","ref":"master","sha":"805fd2fa1ba39b13dfe32344bfefdb3456c7890e","user":{"login":"zotonic","id":829753,"avatar_url":"https://avatars.githubusercontent.com/u/829753?v=3","gravatar_id":"","url":"https://api.github.com/users/zotonic","html_url":"https://github.com/zotonic","followers_url":"https://api.github.com/users/zotonic/followers","following_url":"https://api.github.com/users/zotonic/following{/other_user}","gists_url":"https://api.github.com/users/zotonic/gists{/gist_id}","starred_url":"https://api.github.com/users/zotonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotonic/subscriptions","organizations_url":"https://api.github.com/users/zotonic/orgs","repos_url":"https://api.github.com/users/zotonic/repos","events_url":"https://api.github.com/users/zotonic/events{/privacy}","received_events_url":"https://api.github.com/users/zotonic/received_events","type":"Organization","site_admin":false},"repo":{"id":1847706,"name":"zotonic","full_name":"zotonic/zotonic","owner":{"login":"zotonic","id":829753,"avatar_url":"https://avatars.githubusercontent.com/u/829753?v=3","gravatar_id":"","url":"https://api.github.com/users/zotonic","html_url":"https://github.com/zotonic","followers_url":"https://api.github.com/users/zotonic/followers","following_url":"https://api.github.com/users/zotonic/following{/other_user}","gists_url":"https://api.github.com/users/zotonic/gists{/gist_id}","starred_url":"https://api.github.com/users/zotonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zotonic/subscriptions","organizations_url":"https://api.github.com/users/zotonic/orgs","repos_url":"https://api.github.com/users/zotonic/repos","events_url":"https://api.github.com/users/zotonic/events{/privacy}","received_events_url":"https://api.github.com/users/zotonic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zotonic/zotonic","description":"Zotonic - The Erlang Web Framework & CMS","fork":false,"url":"https://api.github.com/repos/zotonic/zotonic","forks_url":"https://api.github.com/repos/zotonic/zotonic/forks","keys_url":"https://api.github.com/repos/zotonic/zotonic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zotonic/zotonic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zotonic/zotonic/teams","hooks_url":"https://api.github.com/repos/zotonic/zotonic/hooks","issue_events_url":"https://api.github.com/repos/zotonic/zotonic/issues/events{/number}","events_url":"https://api.github.com/repos/zotonic/zotonic/events","assignees_url":"https://api.github.com/repos/zotonic/zotonic/assignees{/user}","branches_url":"https://api.github.com/repos/zotonic/zotonic/branches{/branch}","tags_url":"https://api.github.com/repos/zotonic/zotonic/tags","blobs_url":"https://api.github.com/repos/zotonic/zotonic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zotonic/zotonic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zotonic/zotonic/git/refs{/sha}","trees_url":"https://api.github.com/repos/zotonic/zotonic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zotonic/zotonic/statuses/{sha}","languages_url":"https://api.github.com/repos/zotonic/zotonic/languages","stargazers_url":"https://api.github.com/repos/zotonic/zotonic/stargazers","contributors_url":"https://api.github.com/repos/zotonic/zotonic/contributors","subscribers_url":"https://api.github.com/repos/zotonic/zotonic/subscribers","subscription_url":"https://api.github.com/repos/zotonic/zotonic/subscription","commits_url":"https://api.github.com/repos/zotonic/zotonic/commits{/sha}","git_commits_url":"https://api.github.com/repos/zotonic/zotonic/git/commits{/sha}","comments_url":"https://api.github.com/repos/zotonic/zotonic/comments{/number}","issue_comment_url":"https://api.github.com/repos/zotonic/zotonic/issues/comments{/number}","contents_url":"https://api.github.com/repos/zotonic/zotonic/contents/{+path}","compare_url":"https://api.github.com/repos/zotonic/zotonic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zotonic/zotonic/merges","archive_url":"https://api.github.com/repos/zotonic/zotonic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zotonic/zotonic/downloads","issues_url":"https://api.github.com/repos/zotonic/zotonic/issues{/number}","pulls_url":"https://api.github.com/repos/zotonic/zotonic/pulls{/number}","milestones_url":"https://api.github.com/repos/zotonic/zotonic/milestones{/number}","notifications_url":"https://api.github.com/repos/zotonic/zotonic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zotonic/zotonic/labels{/name}","releases_url":"https://api.github.com/repos/zotonic/zotonic/releases{/id}","deployments_url":"https://api.github.com/repos/zotonic/zotonic/deployments","created_at":"2011-06-04T18:43:30Z","updated_at":"2016-11-22T14:41:41Z","pushed_at":"2016-11-23T11:57:19Z","git_url":"git://github.com/zotonic/zotonic.git","ssh_url":"git@github.com:zotonic/zotonic.git","clone_url":"https://github.com/zotonic/zotonic.git","svn_url":"https://github.com/zotonic/zotonic","homepage":"http://zotonic.com/","size":51884,"stargazers_count":471,"watchers_count":471,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":149,"mirror_url":null,"open_issues_count":200,"forks":149,"open_issues":200,"watchers":471,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zotonic/zotonic/pulls/1534"},"html":{"href":"https://github.com/zotonic/zotonic/pull/1534"},"issue":{"href":"https://api.github.com/repos/zotonic/zotonic/issues/1534"},"comments":{"href":"https://api.github.com/repos/zotonic/zotonic/issues/1534/comments"},"review_comments":{"href":"https://api.github.com/repos/zotonic/zotonic/pulls/1534/comments"},"review_comment":{"href":"https://api.github.com/repos/zotonic/zotonic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zotonic/zotonic/pulls/1534/commits"},"statuses":{"href":"https://api.github.com/repos/zotonic/zotonic/statuses/71ca79d47b6105b654624a751b9b3a4215f71662"}}}}
{"actor":{"display_login":"ddeboer"}}