|
From: Pawel A. F. <pf...@gm...> - 2010-10-02 03:56:06
|
On Fri, Oct 1, 2010 at 5:04 PM, Mateusz Loskot <ma...@lo...> wrote:
> Hi,
>
> The MySQL test #2
>
> try
> {
> session sql(backEnd, "host=test.soci.invalid");
> }
> catch (mysql_soci_error const &e)
> {
> assert(e.err_num_ == CR_UNKNOWN_HOST);
> }
>
> fails with the following error:
>
> /home/mloskot/dev/soci/_git/master/src/backends/mysql/test/test-mysql.cpp:98:
> void test2(): Assertion `
> e.err_num_ == 2005' failed.
>
> The expected CR_UNKNOWN_HOST has value 2005.
> I found out that e.err_num_ thrown in this test case is 2003
> which represents CR_CONN_HOST_ERROR.
>
> It is not clear to me what's the difference between those two error
> codes. Perhaps the assertion should read:
>
> assert(e.err_num_ == CR_UNKNOWN_HOST || e.err_num_ == CR_CONN_HOST_ERROR);
>
> Comments?
No objection. I'll do it when I have a moment, but if you want to do
it before I get to it that would be also very appreciated.
Thanks,
Aleksander
|