{ "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\n

which 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\n

I would have expected my error handler to have caught the\r\nexception rather than crashing the app.

{html}", "attachment": [ { "id": "21467", "filename": "test.js", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-27T05:54:47.000+0000", "size": 41358, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Attempting to SELECT from a non-existant table crashes the app", "creator": { "name": "ben(atgalbraiths)", "key": "ben(atgalbraiths)", "displayName": "ben (at galbraiths)", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ben(atgalbraiths)", "key": "ben(atgalbraiths)", "displayName": "ben (at galbraiths)", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126314", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

We need to have a Serious Discussion about error handling.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:52.000+0000", "updated": "2011-04-15T02:58:52.000+0000" }, { "id": "126315", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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.

{html}", "updateAuthor": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:52.000+0000", "updated": "2011-04-15T02:58:52.000+0000" }, { "id": "126316", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Sorry, to clarify, I can confirm it's broken in 1.5.1. I don't\nknow when it broke.

{html}", "updateAuthor": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:52.000+0000", "updated": "2011-04-15T02:58:52.000+0000" }, { "id": "157561", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Crash happens on simulator according to the crash log.\n\nMay be resolved by the other linked issue.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-22T13:33:58.000+0000", "updated": "2011-06-22T13:33:58.000+0000" }, { "id": "157829", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Replace the test.js from the TIMOB-4174 resources with this test.js to gain the 'SELECT * FROM nonexist' test.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-27T05:54:47.000+0000", "updated": "2011-06-27T05:54:47.000+0000" }, { "id": "157939", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After compiling and running on device, view console and search for \"passed\":false if string is not found, the test passed", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-28T10:30:31.000+0000", "updated": "2011-06-28T10:30:31.000+0000" }, { "id": "159045", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Combined test app from 4174 with test.js from this test and ran on iPhone 4. all \"Passed\": log entries are true. Verified with SDKs 1.7.2 r3d44999e and 1.8.0 r4b694252.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-08T10:59:30.000+0000", "updated": "2011-07-08T10:59:30.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }