diff options
Diffstat (limited to 'server/src')
| -rw-r--r-- | server/src/server.cc | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/server.cc b/server/src/server.cc index 353708f..a419181 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -54,7 +54,7 @@ static std::string error_box(std::string message)    std::string errorbox =      "  <course name=\"error\">\n"      "    <macro name=\"error\">\n" -    "      <window caption=\"ERROR!\" height=\"240\" layout=\"vbox\" name=\"error\" width=\"320\">\n" +    "      <window caption=\"ERROR!\" height=\"300\" layout=\"vbox\" name=\"error\" width=\"480\">\n"      "        <textedit name=\"errorlabel\" value=\"" + message + "\"/>\n"      "        <button action=\"cancel\" caption=\"Luk\" name=\"cancel\"/>\n"      "      </window>\n" @@ -204,7 +204,9 @@ static void connection(TCPSocket &socket)        socket.write(answer);        i++;      } -  } catch(std::exception &e) { +  } catch( PGSTD::runtime_error &e ) { +    socket.write(error_box(xml_encode(std::string("PostgreSQL server error:\n") + e.what()))); +  } catch( std::exception &e ) {      socket.write(error_box(xml_encode(e.what())));    }  | 
