summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-08-18 12:07:28 +0000
committerrandomdan <randomdan@localhost>2013-08-18 12:07:28 +0000
commit37bf72ac7d90fe733e72ee0c876d639a39e57d8d (patch)
treef3b81b197aa564764272f53c0ffaff71e820ee95
parentCentral various bits of the CGI start up process (diff)
downloadproject2-37bf72ac7d90fe733e72ee0c876d639a39e57d8d.tar.bz2
project2-37bf72ac7d90fe733e72ee0c876d639a39e57d8d.tar.xz
project2-37bf72ac7d90fe733e72ee0c876d639a39e57d8d.zip
Add logs for non-usercheck exceptions when processing CGI stages
-rw-r--r--project2/cgi/cgiAppEngine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/project2/cgi/cgiAppEngine.cpp b/project2/cgi/cgiAppEngine.cpp
index bd25172..239170f 100644
--- a/project2/cgi/cgiAppEngine.cpp
+++ b/project2/cgi/cgiAppEngine.cpp
@@ -138,6 +138,7 @@ CgiApplicationEngine::process(std::ostream & IO, CgiRequestContext * crc) const
currentStage = NextStage(new PresentStage(ScriptReader::resolveScript(presentRoot, cf.failedCheck->present(crc), false), crc));
}
catch (const ScriptNotFound & nf) {
+ Logger()->messagebf(LOG_WARNING, "Script not found processing stage: %s", nf.what());
if (notFoundPresent.empty() || triedNotFound) {
currentStage = NextStage(new DefaultNotFoundStage(nf));
}
@@ -147,6 +148,7 @@ CgiApplicationEngine::process(std::ostream & IO, CgiRequestContext * crc) const
}
}
catch (const std::exception & ex) {
+ Logger()->messagebf(LOG_WARNING, "Error processing stage: %s", ex.what());
if (onErrorPresent.empty() || triedOnError) {
currentStage = NextStage(new DefaultErrorStage(ex, crc));
}