Handbook
Glossary
parse-db-error ( error -- error' )
Vocabulary
db
Inputs
error
an
object
Outputs
error'
an
object
Definition
IN:
db
HOOK:
parse-db-error
db-connection
( error -- error' )
Methods
USING:
db
db.mysql
;
M:
mysql-db-connection
parse-db-error
;
USING:
accessors
combinators
db
db.postgresql.errors
db.postgresql.private
kernel
sequences
splitting
;
M:
postgresql-db-connection
parse-db-error
split-lines
dup
length
{
{
1
[
first
parse-postgresql-sql-error
]
}
{
2
[
concat
parse-postgresql-sql-error
]
}
{
3
[
first3
[
parse-postgresql-sql-error
]
2dip
postgresql-location
>>location
]
}
}
case
;
USING:
accessors
combinators
db
db.sqlite.errors
db.sqlite.lib
db.sqlite.private
kernel
;
M:
sqlite-db-connection
parse-db-error
dup
sqlite-error?
[
dup
n>>
{
{
1
[
string>>
parse-sqlite-sql-error
]
}
[
drop
]
}
case
]
when
;