factor/basis/db/errors/errors.factor

25 lines
614 B
Factor
Raw Normal View History

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