application readable error message

Поиск
Список
Период
Сортировка
От SunWuKung
Тема application readable error message
Дата
Msg-id c409c692-4ce0-4d69-9a95-5fc43514df3a@l33g2000pri.googlegroups.com
обсуждение исходный текст
Ответы Re: application readable error message
Список pgsql-general
Hi,
I am trying to return an application error message on certain db
raised errors to the form the info  came from.
What is the usual way for an application to identify the source of an
error?
The info (error type, table, column) is sometimes in the error message
sometimes not, but even when it is there trying to pars the human
readable message is surely not the best approach.

How do you people do it?
Thanks for the help.
SWK

Eg.
- null value in column "langid" violates not-null constraint - non-
null constraint violation, column, table
- ERROR:  insert or update on table "instrumentheader" violates
foreign key constraint "instrumentheader_fk"
  DETAIL:  Key (langid)=(ddd) is not present in table "lang". -
foreign key violation, column, table
  ERROR: ExecInsert: rejected due to CHECK constraint "username_valid"
  on "users" - check constraint violation, column, table
- ERROR:  invalid input syntax for integer: "sss" - datatype mismatch,
column, table


В списке pgsql-general по дате отправления:

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: Possible bug with ALTER LANGUAGE ... OWNER TO ...
Следующее
От: Joris Dobbelsteen
Дата:
Сообщение: Re: Query Question (one group by vs two separate)