{"action":"created","issue":{"url":"https://api.github.com/repos/opensim-org/opensim-core/issues/808","repository_url":"https://api.github.com/repos/opensim-org/opensim-core","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/808/labels{/name}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/808/comments","events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/808/events","html_url":"https://github.com/opensim-org/opensim-core/pull/808","id":138743357,"number":808,"title":"New Exception ctor that takes the name of a type and object.","user":{"login":"chrisdembia","id":846001,"avatar_url":"https://avatars.githubusercontent.com/u/846001?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdembia","html_url":"https://github.com/chrisdembia","followers_url":"https://api.github.com/users/chrisdembia/followers","following_url":"https://api.github.com/users/chrisdembia/following{/other_user}","gists_url":"https://api.github.com/users/chrisdembia/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdembia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdembia/subscriptions","organizations_url":"https://api.github.com/users/chrisdembia/orgs","repos_url":"https://api.github.com/users/chrisdembia/repos","events_url":"https://api.github.com/users/chrisdembia/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdembia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-06T01:50:12Z","updated_at":"2016-03-15T03:29:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opensim-org/opensim-core/pulls/808","html_url":"https://github.com/opensim-org/opensim-core/pull/808","diff_url":"https://github.com/opensim-org/opensim-core/pull/808.diff","patch_url":"https://github.com/opensim-org/opensim-core/pull/808.patch"},"body":"It's very common that we want to throw an exception in which the message contains the name of the class and the name of an instance of that class. It's somewhat tedious to create error messages that include these names, and we are often inconsistent about how we format such messages.\r\n\r\nThis exception constructor allows us to include such names in exception messages more easily and uniformly.\r\n\r\n@klshrinidhi "},"comment":{"url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments/196636806","html_url":"https://github.com/opensim-org/opensim-core/pull/808#issuecomment-196636806","issue_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/808","id":196636806,"user":{"login":"klshrinidhi","id":1181669,"avatar_url":"https://avatars.githubusercontent.com/u/1181669?v=3","gravatar_id":"","url":"https://api.github.com/users/klshrinidhi","html_url":"https://github.com/klshrinidhi","followers_url":"https://api.github.com/users/klshrinidhi/followers","following_url":"https://api.github.com/users/klshrinidhi/following{/other_user}","gists_url":"https://api.github.com/users/klshrinidhi/gists{/gist_id}","starred_url":"https://api.github.com/users/klshrinidhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klshrinidhi/subscriptions","organizations_url":"https://api.github.com/users/klshrinidhi/orgs","repos_url":"https://api.github.com/users/klshrinidhi/repos","events_url":"https://api.github.com/users/klshrinidhi/events{/privacy}","received_events_url":"https://api.github.com/users/klshrinidhi/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T03:29:43Z","updated_at":"2016-03-15T03:29:43Z","body":"I personally would hold off on this until compilers give us macros to do this. I think the *file-name, function name and line-number* are enough information until then. \r\nIf you want to go ahead with this, I think there will be need for another macro `OPENSIM_THROW_<something>` that uses this constructor. Every throw site will have to explicitly disambiguate by calling the right macro.\r\n\r\n"}}