patch: clean up exception formatting

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема patch: clean up exception formatting
Дата
Msg-id 20030720044627.GA32403@opencloud.com
обсуждение исходный текст
Ответы Re: patch: clean up exception formatting  (Barry Lind <blind@xythos.com>)
Список pgsql-jdbc
The attached patch (against CVS HEAD) cleans up exception messages in two
areas:

1. Remove PSQLException's override of toString() so that the exception
classname is included in the output of toString() (i.e. the default
Throwable behaviour). Previously a .toString() on a PSQLException produces
something like:

   "Parameter index out of range."

With this patch you get the consistent-with-everything-else result:

  "org.postgresql.util.PSQLException: Parameter index out of range."

2. Strip whitespace from backend-generated errors when using them as an
exception message. Previously, you'd get tracebacks with odd blank lines:

  java.sql.SQLException: ERROR:  parser: parse error at or near "null" at character 27

     at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:286)
     at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:104)

With this patch you get the expected form:

  java.sql.SQLException: ERROR:  parser: parse error at or near "null" at character 27
     at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:286)
     at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:104)

-O

Вложения

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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: patch: fix skeleton code in test README
Следующее
От: pginfo
Дата:
Сообщение: Re: jdbc batch performance problem