{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/11382","labels_url":"https://api.github.com/repos/golang/go/issues/11382/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/11382/comments","events_url":"https://api.github.com/repos/golang/go/issues/11382/events","html_url":"https://github.com/golang/go/issues/11382","id":90720323,"number":11382,"title":"x/mobile/bind/java: translate panic to a java error","user":{"login":"jamesshoebox","id":10502430,"avatar_url":"https://avatars.githubusercontent.com/u/10502430?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesshoebox","html_url":"https://github.com/jamesshoebox","followers_url":"https://api.github.com/users/jamesshoebox/followers","following_url":"https://api.github.com/users/jamesshoebox/following{/other_user}","gists_url":"https://api.github.com/users/jamesshoebox/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesshoebox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesshoebox/subscriptions","organizations_url":"https://api.github.com/users/jamesshoebox/orgs","repos_url":"https://api.github.com/users/jamesshoebox/repos","events_url":"https://api.github.com/users/jamesshoebox/events{/privacy}","received_events_url":"https://api.github.com/users/jamesshoebox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-24T16:05:03Z","updated_at":"2015-07-06T18:42:43Z","closed_at":null,"body":"A `panic()` from Go code eventually results in a syscall to `exit(2)` which terminates the Android app. This \"clean\" exit prevents Crashlytics (https://get.fabric.io/crashlytics) from capturing a Go panic as a crash.\r\n\r\nCrashlytics support told me:\r\n> We do install a signal handler to capture the crashes. You could write a custom panic() function in Go that uses the OS package to raise a signal, but we are hestitant to treat an exit() as a crash in the native code as it would be the program telling the OS that everything is fine.\r\n\r\nCould we recover these panics and throw a Java Error? Or perhaps syscall `abort` (which should be caught by a SIGABRT handler) instead of `exit`?"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/118953495","html_url":"https://github.com/golang/go/issues/11382#issuecomment-118953495","issue_url":"https://api.github.com/repos/golang/go/issues/11382","id":118953495,"user":{"login":"jamesshoebox","id":10502430,"avatar_url":"https://avatars.githubusercontent.com/u/10502430?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesshoebox","html_url":"https://github.com/jamesshoebox","followers_url":"https://api.github.com/users/jamesshoebox/followers","following_url":"https://api.github.com/users/jamesshoebox/following{/other_user}","gists_url":"https://api.github.com/users/jamesshoebox/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesshoebox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesshoebox/subscriptions","organizations_url":"https://api.github.com/users/jamesshoebox/orgs","repos_url":"https://api.github.com/users/jamesshoebox/repos","events_url":"https://api.github.com/users/jamesshoebox/events{/privacy}","received_events_url":"https://api.github.com/users/jamesshoebox/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T18:42:43Z","updated_at":"2015-07-06T18:42:43Z","body":"I took a stab at implementing this: https://go-review.googlesource.com/#/c/11920/\r\n\r\nFeedback welcome. Haven't written C in years, and JNI code in... ever. :)"}}