{"action":"created","issue":{"url":"https://api.github.com/repos/gcanti/tcomb/issues/67","labels_url":"https://api.github.com/repos/gcanti/tcomb/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/gcanti/tcomb/issues/67/comments","events_url":"https://api.github.com/repos/gcanti/tcomb/issues/67/events","html_url":"https://github.com/gcanti/tcomb/issues/67","id":48338393,"number":67,"title":"Use struct name in error message?","user":{"login":"aearly","id":558190,"avatar_url":"https://avatars.githubusercontent.com/u/558190?v=3","gravatar_id":"","url":"https://api.github.com/users/aearly","html_url":"https://github.com/aearly","followers_url":"https://api.github.com/users/aearly/followers","following_url":"https://api.github.com/users/aearly/following{/other_user}","gists_url":"https://api.github.com/users/aearly/gists{/gist_id}","starred_url":"https://api.github.com/users/aearly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aearly/subscriptions","organizations_url":"https://api.github.com/users/aearly/orgs","repos_url":"https://api.github.com/users/aearly/repos","events_url":"https://api.github.com/users/aearly/events{/privacy}","received_events_url":"https://api.github.com/users/aearly/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-11-11T01:48:16Z","updated_at":"2015-05-12T19:44:37Z","closed_at":"2014-12-02T08:03:19Z","body":"Take this example code:\r\n\r\n```\r\nvar MyNamedStruct = t.struct({\r\n  foo: t.Str,\r\n}, \"MyNamedStruct\");\r\n\r\nvar struct = MyNamedStruct({});\r\n```\r\n\r\nThis throws an error with the mesage:\r\n\r\n```\r\n\"Invalid `undefined` supplied to `Str`\"\r\n```\r\n\r\nSInce I named the struct, wouldn't it be nicer to include the name in the error message?  Such as: \r\n\r\n```\r\n\"Invalid `undefined` supplied to `Str` in MyNamedStruct\"\r\n```\r\n\r\nI can submit a PR if this is desirable, or not better accomplished elsewhere."},"comment":{"url":"https://api.github.com/repos/gcanti/tcomb/issues/comments/101397473","html_url":"https://github.com/gcanti/tcomb/issues/67#issuecomment-101397473","issue_url":"https://api.github.com/repos/gcanti/tcomb/issues/67","id":101397473,"user":{"login":"peterjoel","id":150875,"avatar_url":"https://avatars.githubusercontent.com/u/150875?v=3","gravatar_id":"","url":"https://api.github.com/users/peterjoel","html_url":"https://github.com/peterjoel","followers_url":"https://api.github.com/users/peterjoel/followers","following_url":"https://api.github.com/users/peterjoel/following{/other_user}","gists_url":"https://api.github.com/users/peterjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/peterjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterjoel/subscriptions","organizations_url":"https://api.github.com/users/peterjoel/orgs","repos_url":"https://api.github.com/users/peterjoel/repos","events_url":"https://api.github.com/users/peterjoel/events{/privacy}","received_events_url":"https://api.github.com/users/peterjoel/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T19:44:37Z","updated_at":"2015-05-12T19:44:37Z","body":"Thanks!"}}