cruisercoder / dstddb

A proposed standard database interface and library for D
MIT License
28 stars 10 forks source link

Need more detail exception text during sqllite creation #7

Open bubnenkoff opened 8 years ago

bubnenkoff commented 8 years ago

If to try to create sqllite on not exist path like: try{ createDatabase("file:///C://code1//sqlLiteDBFullName.db").query("CREATE TABLE IF NOT EXISTS ddbct1 (ts text)"); } catch(Exception e) { writeln(e.msg); }

We will get error:

sqlite opening file: C://code1//sqlLiteDBFullName.db error: rc: 1461C78D29 2016-04-06T13:36:33.888:C:\Users\bubenkov_di\AppData\Roaming\dub\packages\dstddb -0.0.3\dstddb\src\std\database\sqlite\database.d:throw_error:429 prepare:unable to open database file sqlite error: prepare:

It's better to throw more human friendly exception.

cruisercoder commented 8 years ago

Agree. Improvements are coming.