{ "id": "62298", "key": "TIMOB-1666", "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": "11358", "description": "Mobile 1.8.0 M05", "name": "Sprint 2011-26", "archived": true, "released": true, "releaseDate": "2011-07-04" }, { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-28T10:45:54.000+0000", "created": "2011-04-15T02:58:51.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "database", "error", "exception", "handling", "ios" ], "versions": [], "issuelinks": [ { "id": "11160", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "64193", "key": "TIMOB-3561", "fields": { "summary": "iOS: Need to handle thrown exceptions in simulator", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "13664", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "82068", "key": "TIMOB-5892", "fields": { "summary": "iOS: needs to handle thrown exceptions (revisiting)", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "11161", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "65668", "key": "TIMOB-4174", "fields": { "summary": "Ti.Database does not expose SQLite exceptions", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-10-27T17:57:54.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
I have this code:
\r\n\r\ntry {\r\n var rs = db.execute('SELECT * FROM meta');\r\n} catch (e) {\r\n Ti.API.info(\"Error: \" + e);\r\n}
\r\n
\r\nwhich results in my app crashing with this error in the OS X\r\nConsole:
\r\n\r\n8/28/10 4:15:45 PM BillingWorks3[17336] *** Terminating app due to uncaught exception 'org.billingworks3.TiDatabaseProxy', reason: 'invalid SQL statement. Error Domain=com.plausiblelabs.pldatabase Code=3 \"An error occured parsing the provided SQL statement.\" UserInfo=0x911bcf0 {com.plausiblelabs.pldatabase.error.vendor.code=1, NSLocalizedDescription=An error occured parsing the provided SQL statement., com.plausiblelabs.pldatabase.error.query.string=SELECT * FROM meta, com.plausiblelabs.pldatabase.error.vendor.string=no such table: meta} in -[TiDatabaseProxy execute:] (TiDatabaseProxy.m:134)'
\r\n
\r\nI would have expected my error handler to have caught the\r\nexception rather than crashing the app.
We need to have a Serious Discussion about error handling.
I reported this in June last year, and it doesn't seem to be\nspecific to DB errors. The helpdesk ticket is http://developer.appcelerator.com/helpdesk/view/19401.\nI thought the problem went away at one point, but crashing due to\nbad DB calls appears to be back in 1.5.1.
Sorry, to clarify, I can confirm it's broken in 1.5.1. I don't\nknow when it broke.