Commit 5f22e36c authored by jan.koester's avatar jan.koester
Browse files

exception works

parent 32d6cbab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ target_include_directories(guestbook
)

target_link_libraries(guestbook 
    netplus::netplus 
    netplus::netplus-static
    htmlpp::htmlpp-static 
    httppp::httppp-static 
    cmdplus::cmdplus

CMakeSettings.json

0 → 100644
+15 −0
Original line number Diff line number Diff line
{
    "configurations": [
        {
            "name": "x64-Debug",
            "generator": "Ninja",
            "configurationType": "Debug",
            "inheritEnvironments": [ "msvc_x64_x64" ],
            "buildRoot": "${projectDir}\\out\\build\\${name}",
            "installRoot": "${projectDir}\\out\\install\\${name}",
            "cmakeCommandArgs": "",
            "buildCommandArgs": "",
            "ctestCommandArgs": ""
        }
    ]
}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -30,3 +30,4 @@ win98|win98
gdrgd|drgdrg
gdrgd|drgdrg
gdrgd|drgdrg
Jan Koester|windows iocp test
+10 −6
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
#include <htmlpp/html.h>
#include <htmlpp/exception.h>

#include <netplus/exception.h>

std::mutex   file_mutex;

struct Browser {
@@ -24,7 +26,9 @@ public:
            page.loadFile(index,"guest.html");
            rpage.loadFile(rindex,"retro.html");
        }catch(libhtmlpp::HTMLException &e){
            throw e.what();
            netplus::NetException ee;
            ee[netplus::NetException::Error] << e.what();
            throw ee.what();
        }
    };

@@ -71,7 +75,7 @@ public:

    }

    void RequestEvent(libhttppp::HttpRequest *curreq,int tid,void *arg){
    void RequestEvent(libhttppp::HttpRequest *curreq,int tid,ULONG_PTR arg){
            try {
                libhttppp::HttpForm gform;

@@ -176,18 +180,18 @@ private:

class HttpConD : public libhttppp::HttpD {
public:
  HttpConD(int argc, char** argv) : HttpD(argc,argv){
  HttpConD(int cargc, char** cargv) : HttpD(cargc,cargv){
    libhttppp::HTTPException httpexception;
    try {
        Controller ctl(getServerSocket());
        ctl.runEventloop();
    }catch(const char *e){
        std::cerr << e << std::endl;
    }catch(netplus::NetException &e){
        std::cerr << e.what() << std::endl;
    }
  };
private:
};

int main(int argc, char** argv){
    HttpConD(argc,argv);
    HttpConD cond(argc,argv);
}