{"action":"created","comment":{"url":"https://api.github.com/repos/OPM/opm-common/pulls/comments/244938536","pull_request_review_id":188933772,"id":244938536,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDkzODUzNg==","diff_hunk":"@@ -0,0 +1,51 @@\n+/*\n+  Copyright 2019 Joakim Hove/datagr\n+\n+  This file is part of the Open Porous Media project (OPM).\n+\n+  OPM is free software: you can redistribute it and/or modify\n+  it under the terms of the GNU General Public License as published by\n+  the Free Software Foundation, either version 3 of the License, or\n+  (at your option) any later version.\n+\n+  OPM is distributed in the hope that it will be useful,\n+  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+  GNU General Public License for more details.\n+\n+  You should have received a copy of the GNU General Public License\n+  along with OPM.  If not, see <http://www.gnu.org/licenses/>.\n+*/\n+\n+\n+#ifndef ERROR_GUARD_HPP\n+#define ERROR_GUARD_HPP\n+\n+#include <string>\n+#include <vector>\n+\n+namespace Opm {\n+\n+class ErrorGuard {\n+public:\n+    void add_error(const std::string& errorKey, const std::string& msg);\n+    void add_warning(const std::string& errorKey, const std::string &msg);\n+\n+    explicit operator bool() const { return !this->error_list.empty(); }\n+\n+    /*\n+      Observe that this desctructor has a somewhat special semantics - it will\n+      throw std::runtime_error if there are errors in the error_list.\n+    */\n+    ~ErrorGuard();\n+\n+private:\n+    void dump() const;\n+\n+    std::vector<std::pair<std::string, std::string>> error_list;","path":"opm/parser/eclipse/Parser/ErrorGuard.hpp","position":45,"original_position":45,"commit_id":"c8928ce36b5eb0d49a7ca73f7d27b66d26d96a53","original_commit_id":"c8928ce36b5eb0d49a7ca73f7d27b66d26d96a53","user":{"login":"joakim-hove","id":1321665,"node_id":"MDQ6VXNlcjEzMjE2NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1321665?v=4","gravatar_id":"","url":"https://api.github.com/users/joakim-hove","html_url":"https://github.com/joakim-hove","followers_url":"https://api.github.com/users/joakim-hove/followers","following_url":"https://api.github.com/users/joakim-hove/following{/other_user}","gists_url":"https://api.github.com/users/joakim-hove/gists{/gist_id}","starred_url":"https://api.github.com/users/joakim-hove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joakim-hove/subscriptions","organizations_url":"https://api.github.com/users/joakim-hove/orgs","repos_url":"https://api.github.com/users/joakim-hove/repos","events_url":"https://api.github.com/users/joakim-hove/events{/privacy}","received_events_url":"https://api.github.com/users/joakim-hove/received_events","type":"User","site_admin":false},"body":"Tough luck :-)","created_at":"2019-01-03T09:02:51Z","updated_at":"2019-01-03T09:02:52Z","html_url":"https://github.com/OPM/opm-common/pull/602#discussion_r244938536","pull_request_url":"https://api.github.com/repos/OPM/opm-common/pulls/602","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/OPM/opm-common/pulls/comments/244938536"},"html":{"href":"https://github.com/OPM/opm-common/pull/602#discussion_r244938536"},"pull_request":{"href":"https://api.github.com/repos/OPM/opm-common/pulls/602"}},"in_reply_to_id":244934915},"pull_request":{"url":"https://api.github.com/repos/OPM/opm-common/pulls/602","id":241793278,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNzkzMjc4","html_url":"https://github.com/OPM/opm-common/pull/602","diff_url":"https://github.com/OPM/opm-common/pull/602.diff","patch_url":"https://github.com/OPM/opm-common/pull/602.patch","issue_url":"https://api.github.com/repos/OPM/opm-common/issues/602","number":602,"state":"open","locked":false,"title":"Add small class ErrorGuard to store errors from parsing","user":{"login":"joakim-hove","id":1321665,"node_id":"MDQ6VXNlcjEzMjE2NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1321665?v=4","gravatar_id":"","url":"https://api.github.com/users/joakim-hove","html_url":"https://github.com/joakim-hove","followers_url":"https://api.github.com/users/joakim-hove/followers","following_url":"https://api.github.com/users/joakim-hove/following{/other_user}","gists_url":"https://api.github.com/users/joakim-hove/gists{/gist_id}","starred_url":"https://api.github.com/users/joakim-hove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joakim-hove/subscriptions","organizations_url":"https://api.github.com/users/joakim-hove/orgs","repos_url":"https://api.github.com/users/joakim-hove/repos","events_url":"https://api.github.com/users/joakim-hove/events{/privacy}","received_events_url":"https://api.github.com/users/joakim-hove/received_events","type":"User","site_admin":false},"body":"Small container to temporarily store errors from Parsing process. Not in use in this PR.\r\n\r\nNB: Aggressive destructor!\r\n","created_at":"2019-01-02T16:44:02Z","updated_at":"2019-01-03T09:02:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0793990d4393fb524f42623aacce2f9841cd26c9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OPM/opm-common/pulls/602/commits","review_comments_url":"https://api.github.com/repos/OPM/opm-common/pulls/602/comments","review_comment_url":"https://api.github.com/repos/OPM/opm-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OPM/opm-common/issues/602/comments","statuses_url":"https://api.github.com/repos/OPM/opm-common/statuses/c8928ce36b5eb0d49a7ca73f7d27b66d26d96a53","head":{"label":"joakim-hove:error-list","ref":"error-list","sha":"c8928ce36b5eb0d49a7ca73f7d27b66d26d96a53","user":{"login":"joakim-hove","id":1321665,"node_id":"MDQ6VXNlcjEzMjE2NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1321665?v=4","gravatar_id":"","url":"https://api.github.com/users/joakim-hove","html_url":"https://github.com/joakim-hove","followers_url":"https://api.github.com/users/joakim-hove/followers","following_url":"https://api.github.com/users/joakim-hove/following{/other_user}","gists_url":"https://api.github.com/users/joakim-hove/gists{/gist_id}","starred_url":"https://api.github.com/users/joakim-hove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joakim-hove/subscriptions","organizations_url":"https://api.github.com/users/joakim-hove/orgs","repos_url":"https://api.github.com/users/joakim-hove/repos","events_url":"https://api.github.com/users/joakim-hove/events{/privacy}","received_events_url":"https://api.github.com/users/joakim-hove/received_events","type":"User","site_admin":false},"repo":{"id":32456806,"node_id":"MDEwOlJlcG9zaXRvcnkzMjQ1NjgwNg==","name":"opm-common","full_name":"joakim-hove/opm-common","private":false,"owner":{"login":"joakim-hove","id":1321665,"node_id":"MDQ6VXNlcjEzMjE2NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1321665?v=4","gravatar_id":"","url":"https://api.github.com/users/joakim-hove","html_url":"https://github.com/joakim-hove","followers_url":"https://api.github.com/users/joakim-hove/followers","following_url":"https://api.github.com/users/joakim-hove/following{/other_user}","gists_url":"https://api.github.com/users/joakim-hove/gists{/gist_id}","starred_url":"https://api.github.com/users/joakim-hove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joakim-hove/subscriptions","organizations_url":"https://api.github.com/users/joakim-hove/orgs","repos_url":"https://api.github.com/users/joakim-hove/repos","events_url":"https://api.github.com/users/joakim-hove/events{/privacy}","received_events_url":"https://api.github.com/users/joakim-hove/received_events","type":"User","site_admin":false},"html_url":"https://github.com/joakim-hove/opm-common","description":"Shared cmake files across flow simulation and upscaling repositories","fork":true,"url":"https://api.github.com/repos/joakim-hove/opm-common","forks_url":"https://api.github.com/repos/joakim-hove/opm-common/forks","keys_url":"https://api.github.com/repos/joakim-hove/opm-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joakim-hove/opm-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joakim-hove/opm-common/teams","hooks_url":"https://api.github.com/repos/joakim-hove/opm-common/hooks","issue_events_url":"https://api.github.com/repos/joakim-hove/opm-common/issues/events{/number}","events_url":"https://api.github.com/repos/joakim-hove/opm-common/events","assignees_url":"https://api.github.com/repos/joakim-hove/opm-common/assignees{/user}","branches_url":"https://api.github.com/repos/joakim-hove/opm-common/branches{/branch}","tags_url":"https://api.github.com/repos/joakim-hove/opm-common/tags","blobs_url":"https://api.github.com/repos/joakim-hove/opm-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joakim-hove/opm-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joakim-hove/opm-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/joakim-hove/opm-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joakim-hove/opm-common/statuses/{sha}","languages_url":"https://api.github.com/repos/joakim-hove/opm-common/languages","stargazers_url":"https://api.github.com/repos/joakim-hove/opm-common/stargazers","contributors_url":"https://api.github.com/repos/joakim-hove/opm-common/contributors","subscribers_url":"https://api.github.com/repos/joakim-hove/opm-common/subscribers","subscription_url":"https://api.github.com/repos/joakim-hove/opm-common/subscription","commits_url":"https://api.github.com/repos/joakim-hove/opm-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/joakim-hove/opm-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/joakim-hove/opm-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/joakim-hove/opm-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/joakim-hove/opm-common/contents/{+path}","compare_url":"https://api.github.com/repos/joakim-hove/opm-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joakim-hove/opm-common/merges","archive_url":"https://api.github.com/repos/joakim-hove/opm-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joakim-hove/opm-common/downloads","issues_url":"https://api.github.com/repos/joakim-hove/opm-common/issues{/number}","pulls_url":"https://api.github.com/repos/joakim-hove/opm-common/pulls{/number}","milestones_url":"https://api.github.com/repos/joakim-hove/opm-common/milestones{/number}","notifications_url":"https://api.github.com/repos/joakim-hove/opm-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joakim-hove/opm-common/labels{/name}","releases_url":"https://api.github.com/repos/joakim-hove/opm-common/releases{/id}","deployments_url":"https://api.github.com/repos/joakim-hove/opm-common/deployments","created_at":"2015-03-18T12:14:21Z","updated_at":"2018-12-13T18:13:37Z","pushed_at":"2019-01-02T21:11:28Z","git_url":"git://github.com/joakim-hove/opm-common.git","ssh_url":"git@github.com:joakim-hove/opm-common.git","clone_url":"https://github.com/joakim-hove/opm-common.git","svn_url":"https://github.com/joakim-hove/opm-common","homepage":null,"size":8874,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OPM:master","ref":"master","sha":"f6136e69fef7c667eea52208d6eed799928a00b1","user":{"login":"OPM","id":1827197,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MjcxOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1827197?v=4","gravatar_id":"","url":"https://api.github.com/users/OPM","html_url":"https://github.com/OPM","followers_url":"https://api.github.com/users/OPM/followers","following_url":"https://api.github.com/users/OPM/following{/other_user}","gists_url":"https://api.github.com/users/OPM/gists{/gist_id}","starred_url":"https://api.github.com/users/OPM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPM/subscriptions","organizations_url":"https://api.github.com/users/OPM/orgs","repos_url":"https://api.github.com/users/OPM/repos","events_url":"https://api.github.com/users/OPM/events{/privacy}","received_events_url":"https://api.github.com/users/OPM/received_events","type":"Organization","site_admin":false},"repo":{"id":32443143,"node_id":"MDEwOlJlcG9zaXRvcnkzMjQ0MzE0Mw==","name":"opm-common","full_name":"OPM/opm-common","private":false,"owner":{"login":"OPM","id":1827197,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MjcxOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1827197?v=4","gravatar_id":"","url":"https://api.github.com/users/OPM","html_url":"https://github.com/OPM","followers_url":"https://api.github.com/users/OPM/followers","following_url":"https://api.github.com/users/OPM/following{/other_user}","gists_url":"https://api.github.com/users/OPM/gists{/gist_id}","starred_url":"https://api.github.com/users/OPM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPM/subscriptions","organizations_url":"https://api.github.com/users/OPM/orgs","repos_url":"https://api.github.com/users/OPM/repos","events_url":"https://api.github.com/users/OPM/events{/privacy}","received_events_url":"https://api.github.com/users/OPM/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/OPM/opm-common","description":"Common components for OPM, in particular build system (cmake).","fork":false,"url":"https://api.github.com/repos/OPM/opm-common","forks_url":"https://api.github.com/repos/OPM/opm-common/forks","keys_url":"https://api.github.com/repos/OPM/opm-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OPM/opm-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OPM/opm-common/teams","hooks_url":"https://api.github.com/repos/OPM/opm-common/hooks","issue_events_url":"https://api.github.com/repos/OPM/opm-common/issues/events{/number}","events_url":"https://api.github.com/repos/OPM/opm-common/events","assignees_url":"https://api.github.com/repos/OPM/opm-common/assignees{/user}","branches_url":"https://api.github.com/repos/OPM/opm-common/branches{/branch}","tags_url":"https://api.github.com/repos/OPM/opm-common/tags","blobs_url":"https://api.github.com/repos/OPM/opm-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OPM/opm-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OPM/opm-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/OPM/opm-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OPM/opm-common/statuses/{sha}","languages_url":"https://api.github.com/repos/OPM/opm-common/languages","stargazers_url":"https://api.github.com/repos/OPM/opm-common/stargazers","contributors_url":"https://api.github.com/repos/OPM/opm-common/contributors","subscribers_url":"https://api.github.com/repos/OPM/opm-common/subscribers","subscription_url":"https://api.github.com/repos/OPM/opm-common/subscription","commits_url":"https://api.github.com/repos/OPM/opm-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/OPM/opm-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/OPM/opm-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/OPM/opm-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/OPM/opm-common/contents/{+path}","compare_url":"https://api.github.com/repos/OPM/opm-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OPM/opm-common/merges","archive_url":"https://api.github.com/repos/OPM/opm-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OPM/opm-common/downloads","issues_url":"https://api.github.com/repos/OPM/opm-common/issues{/number}","pulls_url":"https://api.github.com/repos/OPM/opm-common/pulls{/number}","milestones_url":"https://api.github.com/repos/OPM/opm-common/milestones{/number}","notifications_url":"https://api.github.com/repos/OPM/opm-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OPM/opm-common/labels{/name}","releases_url":"https://api.github.com/repos/OPM/opm-common/releases{/id}","deployments_url":"https://api.github.com/repos/OPM/opm-common/deployments","created_at":"2015-03-18T06:59:50Z","updated_at":"2018-12-20T17:19:59Z","pushed_at":"2019-01-03T08:47:32Z","git_url":"git://github.com/OPM/opm-common.git","ssh_url":"git@github.com:OPM/opm-common.git","clone_url":"https://github.com/OPM/opm-common.git","svn_url":"https://github.com/OPM/opm-common","homepage":"http://www.opm-project.org","size":8794,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":50,"open_issues":42,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OPM/opm-common/pulls/602"},"html":{"href":"https://github.com/OPM/opm-common/pull/602"},"issue":{"href":"https://api.github.com/repos/OPM/opm-common/issues/602"},"comments":{"href":"https://api.github.com/repos/OPM/opm-common/issues/602/comments"},"review_comments":{"href":"https://api.github.com/repos/OPM/opm-common/pulls/602/comments"},"review_comment":{"href":"https://api.github.com/repos/OPM/opm-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OPM/opm-common/pulls/602/commits"},"statuses":{"href":"https://api.github.com/repos/OPM/opm-common/statuses/c8928ce36b5eb0d49a7ca73f7d27b66d26d96a53"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"joakim-hove"}}