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
commitc9c8292404f26356c3923dddd384188410a7fefa (patch)
treef3b81b197aa564764272f53c0ffaff71e820ee95
parentCentral various bits of the CGI start up process (diff)
downloadproject2-c9c8292404f26356c3923dddd384188410a7fefa.tar.bz2
project2-c9c8292404f26356c3923dddd384188410a7fefa.tar.xz
project2-c9c8292404f26356c3923dddd384188410a7fefa.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));
}