2008-05-30 19:00:42 -04:00
|
|
|
! Copyright (C) 2008 Doug Coleman.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2009-02-21 22:22:51 -05:00
|
|
|
USING: accessors kernel ;
|
2008-05-30 19:00:42 -04:00
|
|
|
IN: db.errors
|
|
|
|
|
|
|
|
ERROR: db-error ;
|
2009-02-21 22:22:51 -05:00
|
|
|
ERROR: sql-error location ;
|
2008-05-30 19:00:42 -04:00
|
|
|
|
|
|
|
ERROR: bad-schema ;
|
2009-02-20 21:40:17 -05:00
|
|
|
|
2009-02-21 22:22:51 -05:00
|
|
|
ERROR: sql-table-exists < sql-error table ;
|
|
|
|
: <sql-table-exists> ( table -- error )
|
|
|
|
\ sql-table-exists new
|
|
|
|
swap >>table ;
|
2009-02-20 21:40:17 -05:00
|
|
|
|
2009-02-21 22:22:51 -05:00
|
|
|
ERROR: sql-table-missing < sql-error table ;
|
|
|
|
: <sql-table-missing> ( table -- error )
|
|
|
|
\ sql-table-missing new
|
|
|
|
swap >>table ;
|
2009-02-20 21:40:17 -05:00
|
|
|
|
2009-02-21 22:22:51 -05:00
|
|
|
ERROR: sql-syntax-error < sql-error message ;
|
|
|
|
: <sql-syntax-error> ( message -- error )
|
|
|
|
\ sql-syntax-error new
|
|
|
|
swap >>message ;
|