{ "id": "90893", "key": "TIMOB-8890", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-02-16T00:38:33.000+0000", "created": "2012-04-25T15:11:09.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "25896", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "99474", "key": "TIMOB-10505", "fields": { "summary": "Android: Expose runtime errors to module developers", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-13T18:24:04.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The customer wants to create a crash reporter. He needs to have a global listener that just catches errors and makes an api call before it raises. At the moment he's just trying to log beforehand then raise. The below code doesn't catch any errors. Is it because it's a KrollRuntime Thread not a Thread? \r\n{code}\r\n@Kroll.method\r\n public void start() {\r\n CrashHandler.register(TiApplication.getAppRootOrCurrentActivity().getApplicationContext());\r\n }\r\n\r\n\r\n public class CrashHandler {\r\n private static final String LCAT = \"CrashModule\";\r\n private static final boolean DBG = TiConfig.LOGD;\r\n\r\n private static class AppceleratorCrashExceptionHandler implements UncaughtExceptionHandler {\r\n private UncaughtExceptionHandler defaultExceptionHandler;\r\n\r\n public AppceleratorCrashExceptionHandler(UncaughtExceptionHandler defaultExceptionHandlerIn) {\r\n defaultExceptionHandler = defaultExceptionHandlerIn;\r\n }\r\n\r\n public void uncaughtException(Thread t, Throwable e) {\r\n Log.d(LCAT, \"==============I'm DOING IT!\");\r\n defaultExceptionHandler.uncaughtException(t, e);\r\n }\r\n }\r\n\r\n public static void register(Context context) {\r\n UncaughtExceptionHandler currentHandler = Thread.getDefaultUncaughtExceptionHandler();\r\n Thread.setDefaultUncaughtExceptionHandler(new AppceleratorCrashExceptionHandler(currentHandler));\r\n }\r\n }\r\n{code}\r\nIs it possible to accomplish this with titanium?", "attachment": [], "flagged": false, "summary": "Android: Unable to catch any errors while creating a crash reporter", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "android 2.2\r\nTi SDK 2.0.1.GA2", "comment": { "comments": [ { "id": "238783", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-16T00:38:02.000+0000", "updated": "2013-02-16T00:38:02.000+0000" }, { "id": "411455", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-13T18:24:04.000+0000", "updated": "2017-03-13T18:24:04.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }