Commit c9d82df0 authored by jan.koester's avatar jan.koester
Browse files

correct throw in content

parent 3d5e2898
Loading
Loading
Loading
Loading
+22 −6
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#include <iostream>

#include <htmlpp/html.h>
#include <htmlpp/exception.h>

#include <httppp/http.h>
#include <httppp/exception.h>

@@ -184,7 +186,12 @@ namespace blogi {

            std::string out;

            try{
                page.getElementbyID("main")->insertChild(condat.parse());
            }catch(libhtmlpp::HTMLException &e){
                excep[libhttppp::HTTPException::Error] << e.what();
                throw excep;
            }

            Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid));

@@ -378,7 +385,12 @@ namespace blogi {

            std::string out;

            try{
                page.getElementbyID("main")->insertChild(condat.parse());
            }catch(libhtmlpp::HTMLException &e){
                excep[libhttppp::HTTPException::Error] << e.what();
                throw excep;
            }

            Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid));

@@ -551,7 +563,7 @@ namespace blogi {
            int ccamount;

            if ((ccamount=Args->database->exec(&sql,res)) < 0) {
                excep[libhttppp::HTTPException::Critical] << "can't find tages for this content id !";
                excep[libhttppp::HTTPException::Error] << "can't find tages for this content id !";
                throw excep;
            }

@@ -574,8 +586,12 @@ namespace blogi {
            };
            std::string out;

            try{
                page.getElementbyID("main")->insertChild(condat.parse());

            }catch(libhtmlpp::HTMLException &e){
                excep[libhttppp::HTTPException::Error] << e.what();
                throw excep;
            }
            Args->theme->printSite(out,page,curreq->getRequestURL(),Args->auth->isLoggedIn(curreq,sid));

            libhttppp::HttpResponse resp;