{"action":"opened","issue":{"url":"https://api.github.com/repos/mono/CppSharp/issues/653","repository_url":"https://api.github.com/repos/mono/CppSharp","labels_url":"https://api.github.com/repos/mono/CppSharp/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/mono/CppSharp/issues/653/comments","events_url":"https://api.github.com/repos/mono/CppSharp/issues/653/events","html_url":"https://github.com/mono/CppSharp/issues/653","id":157364857,"number":653,"title":"Driver::SaveCode should handle exceptions","user":{"login":"JSandusky","id":5519639,"avatar_url":"https://avatars.githubusercontent.com/u/5519639?v=3","gravatar_id":"","url":"https://api.github.com/users/JSandusky","html_url":"https://github.com/JSandusky","followers_url":"https://api.github.com/users/JSandusky/followers","following_url":"https://api.github.com/users/JSandusky/following{/other_user}","gists_url":"https://api.github.com/users/JSandusky/gists{/gist_id}","starred_url":"https://api.github.com/users/JSandusky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSandusky/subscriptions","organizations_url":"https://api.github.com/users/JSandusky/orgs","repos_url":"https://api.github.com/users/JSandusky/repos","events_url":"https://api.github.com/users/JSandusky/events{/privacy}","received_events_url":"https://api.github.com/users/JSandusky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-29T01:49:06Z","updated_at":"2016-05-29T01:49:06Z","closed_at":null,"body":"##### Brief Description\r\n\r\nDriver::SaveCode(List<GeneratorOutput> outputs) uses File.WriteAllText() which can fail. The problem is not that it can fail, but that if one file fails everything afterwards is halted (terminated by exception).\r\n\r\nMy particular case where this came up as undesirable is that in a few generated files I've modified the bindings that were produced (had to fix the code generated for a const char** c-string array), and then set the files to read-only in order to prevent subsequent generation from overwriting them.\r\n\r\nIn the simplest case of working around this I've just wrapped the File.WriteAllText() call in a catch-all and printed that there was an error generating the file if anything is raised (moving the \"Generated {0}\" print to afterwards of course).\r\n\r\nOS: Windows\r\nTarget: MSVC/C++11 CLI output"}}
{"actor":{"display_login":"JSandusky"}}