Overview
Comment: | Added layer of exception handling inside db:with-db |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
171838c893cd9d4690fb80644d8faf00 |
User & Date: | mrwellan on 2014-11-21 10:56:22 |
Other Links: | branch diff | manifest | tags |
Context
2014-11-21
| ||
13:18 | Better err msg check-in: 738756b239 user: mrwellan tags: v1.60 | |
10:56 | Added layer of exception handling inside db:with-db check-in: 171838c893 user: mrwellan tags: v1.60 | |
2014-11-20
| ||
22:20 | full fs access support and megatest.db turned off by default check-in: 84336a6b8f user: matt tags: v1.60 | |
Changes
Modified db.scm from [7c7482ed09] to [5465f7a4df].
︙ | ︙ | |||
102 103 104 105 106 107 108 | ;; (define (db:with-db dbstruct run-id r/w proc . params) (let* ((dbdat (if (vector? dbstruct) (db:get-db dbstruct run-id) dbstruct)) ;; cheat, allow for passing in a dbdat (db (db:dbdat-get-db dbdat))) (db:delay-if-busy dbdat) | > > > > > | | | | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | ;; (define (db:with-db dbstruct run-id r/w proc . params) (let* ((dbdat (if (vector? dbstruct) (db:get-db dbstruct run-id) dbstruct)) ;; cheat, allow for passing in a dbdat (db (db:dbdat-get-db dbdat))) (db:delay-if-busy dbdat) (handle-exceptions exn (begin (debug:print 0 "ERROR: sqlite3 issue in db:with-db, params=" params " error: " ((condition-property-accessor 'exn 'message) exn)) (print-call-chain (current-error-port))) (let ((res (apply proc db params))) (if (vector? dbstruct)(db:done-with dbstruct run-id r/w)) res)))) ;;====================================================================== ;; K E E P F I L E D B I N dbstruct ;;====================================================================== ;; (define (db:get-filedb dbstruct run-id) ;; (let ((db (vector-ref dbstruct 2))) |
︙ | ︙ |