{ "id": "61555", "key": "TIMOB-923", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-07-25T15:27:42.000+0000", "created": "2011-04-15T02:39:16.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [ { "id": "19182", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-07-27T08:59:41.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": "{html}
See \nQ&A
\nBasically he put a try/catch around getCurrentPosition() because\nit throws an error if Location is not available. This may be\nworking correctly. Just needs to be verified.
\nIf working as it should, mark ticket invalide.
This appears to be quite valid, since the exception is raised\ndue to:
\n(from ti.modules.titanium.geolocation.TiLocation.java)
precondition: GPS is switched off on device
\ngetCurrentPosition is called in the TiLocation module
\ngetLastKnownLocation is null, since GPS is off
\nresulting location variable is null
\nexception \"location currently unavailable' is raised
\n..and rightly so: the result of getLastKnownLocation is null, so\nan exception is raised. Seems logical to me.
\nIf this kind of call is allowed and the exception should not be\nraised, suggest removing the exception in this case.
Look through the iPhone classes and see if you can locate what\nthey do in a similar instance. IIRC this \"worked\" as in didn't\nthrow an exception on iPhone, but did on Android. The expected\nbehavior is probably to never throw an exception but to put any\nerrors into the error object and call it instead.
I've verified that in Geolocation.m there is no exception\nthrown.