summaryrefslogtreecommitdiffabout
path: root/htdocs/exceptions/index.chtml
authorMichael Krelin <hacker@klever.net>2005-01-30 00:57:53 (UTC)
committer Michael Krelin <hacker@klever.net>2005-01-30 00:57:53 (UTC)
commit71f4cc84c3788c6904ede17cd626a9ca9c349e3b (patch) (unidiff)
treecfe7736ae3416ad314b7451b756e587335c357c7 /htdocs/exceptions/index.chtml
parentacd2a536dd6bb3ef9438482725f77ac9044ae79b (diff)
downloadsitecing-71f4cc84c3788c6904ede17cd626a9ca9c349e3b.zip
sitecing-71f4cc84c3788c6904ede17cd626a9ca9c349e3b.tar.gz
sitecing-71f4cc84c3788c6904ede17cd626a9ca9c349e3b.tar.bz2
initial commit into repository
Diffstat (limited to 'htdocs/exceptions/index.chtml') (more/less context) (ignore whitespace changes)
-rw-r--r--htdocs/exceptions/index.chtml52
1 files changed, 52 insertions, 0 deletions
diff --git a/htdocs/exceptions/index.chtml b/htdocs/exceptions/index.chtml
new file mode 100644
index 0000000..cc0ed8a
--- a/dev/null
+++ b/htdocs/exceptions/index.chtml
@@ -0,0 +1,52 @@
1% html(); return; /* vim:set ft=sitecing: */
2%%derive layout = "/ancestry/layout.chtml";
3<%codemethod string title() %>
4 return "exceptions handling";
5</%codemethod>
6<%method void content() %>
7 <h1>site-C-ing exception handling</h1>
8 <p>
9 The purpose of this section is to give an overview of the <em>site-C-ing</em>
10 exception handling mechanism. Before the web visitor can see the page each
11 site-C-ing component goes through a few stages, namely, preprocessing,
12 compiling and execution. Having three stages to go through also means the
13 stages one can fail to go through and three exciting opportunities to handle
14 different errors.
15 </p>
16 <p>
17 First each component is preprocessed so that you can feed the valid c++ code
18 to the compiler. Here is where the preprocessor can choke at your broken
19 source code. Once preprocessor failes to parse your code it will throw an
20 exception which <em>site-C-ing</em> will catch and pass to <a
21 href="/sources/htdocs/handlers/exception_dev" title="development mode
22 exception handler source">the exception handler component</a>. Want to <a
23 href="/exceptions/preprocess">read more</a> about preprocessor exception
24 handling?
25 </p>
26 <p>
27 After the preprocessing stage is over we have a great opportunity to catch
28 the compile-time errors. After <em>site-C-ing</em> fails to compile the
29 component it throws another exception and passes it to the same handler which
30 may show you some information on what's gone wrong with your source code from
31 the compiler's perspective. If you've gone this far you definitely want to <a
32 href="/exceptions/compile">read more</a> about the compiler error handling.
33 </p>
34 <p class="note">
35 Note, that it is likely that you will want to disable the steps above for the
36 production environment to save time on unnecessary checking whether the
37 component is up to date.
38 </p>
39 <p>
40 Finally, we need to execute the component and present its output to the web
41 site visitor. This is also where things may go wrong and here is where your
42 component may throw an exception for the engine to catch and pass to the
43 handler. Feel free to <a href="/exceptions/runtime">learn more</a> about it
44 as well.
45 </p>
46 <p class="note">
47 One more thing you will likely want to have differently in production
48 environment is <a href="/sources/htdocs/handlers/exception_prod"
49 title="production mode exception handler source">an exception handler</a>
50 which will not give out that much unnecessary information to the user.
51 </p>
52</%method>