Skip to content

Conversation

DanielPlainview
Copy link
Contributor

В данный момент при отсутствии соединения из-за error2exception выбрасывается BaseException. Правильнее выбрасывать DatabaseException.

Отмечу, что pg_errormessage() в данном контексте использоваться не может, потому что требует установленного соединения:

PHP Warning:  pg_errormessage(): No PostgreSQL link opened yet

@crazedr0m
Copy link
Contributor

Да, наверное.

@dovg
Copy link
Member

dovg commented Jun 28, 2012

Я - за.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<?php
$this->fail('Unreachable code');

капельку наглядней должно быть

@dovg
Copy link
Member

dovg commented Jun 29, 2012

Волью. Нам это нужно :)

dovg added a commit that referenced this pull request Jun 29, 2012
DatabaseException при отсутствии соединения
@dovg dovg merged commit d476b09 into onPHP:master Jun 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants