Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

iOS simulator close because not valid the try {} catch()

$
0
0

I have this try in my code:

`try{

    var checkPedidoColumn = db.execute('ALTER TABLE pedido_item ADD COLUMN "min_tamanho" NUMERIC');

} catch(e) {

    Ti.API.info('the column min_tamanho exists in the table pedido_item');
}`

This table and column exists and try this ok, until the iOS 8.3. Now the titanium return:

A SQLite database error occurred on database '/Users/maicocardoso/Library/Developer/CoreSimulator/Devices/B7AFD1AF-767E-42CD-A370-C2D904417918/data/Containers/Data/Application/C1F57F5A-311C-48A1-8042-1C1FEEC20DED/Library/Private Documents/database3.sql': Error Domain=com.plausiblelabs.pldatabase Code=3 "An error occured parsing the provided SQL statement." UserInfo=0x797aea90 {com.plausiblelabs.pldatabase.error.vendor.code=1, NSLocalizedDescription=An error occured parsing the provided SQL statement., com.plausiblelabs.pldatabase.error.query.string=ALTER TABLE pedido_item ADD COLUMN "min_tamanho" NUMERIC, com.plausiblelabs.pldatabase.error.vendor.string=duplicate column name: min_tamanho} (SQLite #1: duplicate column name: min_tamanho) (query: 'ALTER TABLE pedido_item ADD COLUMN "min_tamanho" NUMERIC')

And the simulator close.I would like to now if the rule change or this is a bug. thanks!


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>