]> gitweb.factorcode.org Git - factor.git/commitdiff
db.sqlite: fix ERROR:
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 13 Aug 2015 07:18:29 +0000 (00:18 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 13 Aug 2015 07:18:29 +0000 (00:18 -0700)
basis/db/sqlite/lib/lib.factor

index defc73088409d600790b10b00f9874379b509b0a..35ebfb12f76c2a0f439edb6889f1f849ab443001 100644 (file)
@@ -11,18 +11,18 @@ IN: db.sqlite.lib
 ERROR: sqlite-error < db-error n string ;
 ERROR: sqlite-sql-error < sql-error n string ;
 
-: throw-sqlite-error ( n -- * )
-    dup sqlite-error-messages nth sqlite-error ;
+: sqlite-other-error ( n -- * )
+    dup sqlite-error-messages nth throw-sqlite-error ;
 
 : sqlite-statement-error ( -- * )
     SQLITE_ERROR
-    db-connection get handle>> sqlite3_errmsg sqlite-sql-error ;
+    db-connection get handle>> sqlite3_errmsg throw-sqlite-sql-error ;
 
 : sqlite-check-result ( n -- )
     {
         { SQLITE_OK [ ] }
         { SQLITE_ERROR [ sqlite-statement-error ] }
-        [ throw-sqlite-error ]
+        [ sqlite-other-error ]
     } case ;
 
 : sqlite-open ( path -- db )