summaryrefslogtreecommitdiffabout
path: root/htdocs/exceptions
Unidiff
Diffstat (limited to 'htdocs/exceptions') (more/less context) (show whitespace changes)
-rw-r--r--htdocs/exceptions/compile.chtml2
-rw-r--r--htdocs/exceptions/index.chtml4
-rw-r--r--htdocs/exceptions/preprocess.chtml2
-rw-r--r--htdocs/exceptions/runtime.chtml2
4 files changed, 10 insertions, 0 deletions
diff --git a/htdocs/exceptions/compile.chtml b/htdocs/exceptions/compile.chtml
index aa4c8df..68dd034 100644
--- a/htdocs/exceptions/compile.chtml
+++ b/htdocs/exceptions/compile.chtml
@@ -1,28 +1,30 @@
1% html(); return; /* vim:set ft=sitecing: */ 1% html(); return; /* vim:set ft=sitecing: */
2%%derive layout = "/ancestry/layout.chtml"; 2%%derive layout = "/ancestry/layout.chtml";
3<%constructor> 3<%constructor>
4 b_strict = false; 4 b_strict = false;
5 PN_PREV("/exceptions/preprocess","preprocess","preprocessing errors");
6 PN_NEXT("/exceptions/runtime","runtime","runtime exceptions");
5</%constructor> 7</%constructor>
6<%codemethod string title() %> 8<%codemethod string title() %>
7 return "compile-time exceptions handling"; 9 return "compile-time exceptions handling";
8</%codemethod> 10</%codemethod>
9<%method void content() %> 11<%method void content() %>
10 <h1>site-C-ing compile-time exception handling</h1> 12 <h1>site-C-ing compile-time exception handling</h1>
11 <p> 13 <p>
12 Similar to <a href="/exceptions/preprocess">preprocessing exceptions</a> 14 Similar to <a href="/exceptions/preprocess">preprocessing exceptions</a>
13 there is a wide range of errors you may put into your code which will pass 15 there is a wide range of errors you may put into your code which will pass
14 through preprocessor and will be caught later at the compile-time. 16 through preprocessor and will be caught later at the compile-time.
15 </p> 17 </p>
16 <p> 18 <p>
17 Once you complete writing your <a 19 Once you complete writing your <a
18 href="/view/htdocs/exceptions/development/compile.chtml" target="insert" 20 href="/view/htdocs/exceptions/development/compile.chtml" target="insert"
19 title="the link opens in the frame below">erroneous code</a> and 21 title="the link opens in the frame below">erroneous code</a> and
20 <em>site-C-ing</em> is done preprocessing it, it will feed the preprocessed 22 <em>site-C-ing</em> is done preprocessing it, it will feed the preprocessed
21 code into c++ compiler which will refuse to compile the code like this. This 23 code into c++ compiler which will refuse to compile the code like this. This
22 is where <a href="/view/htdocs/handlers/exception_dev" target="insert" 24 is where <a href="/view/htdocs/handlers/exception_dev" target="insert"
23 title="the link opens in the frame below">the exception handler</a>, 25 title="the link opens in the frame below">the exception handler</a>,
24 specified in <a href="/view/htdocs/exceptions/development/.scrc" 26 specified in <a href="/view/htdocs/exceptions/development/.scrc"
25 target="insert" title="the link opens in the frame below">the configuration 27 target="insert" title="the link opens in the frame below">the configuration
26 file</a>, takes over the process and gives you <a 28 file</a>, takes over the process and gives you <a
27 href="/exceptions/development/compile" target="insert" title="the link opens 29 href="/exceptions/development/compile" target="insert" title="the link opens
28 in the frame below">the report</a>. Like with any handler, you may wish to 30 in the frame below">the report</a>. Like with any handler, you may wish to
diff --git a/htdocs/exceptions/index.chtml b/htdocs/exceptions/index.chtml
index cc0ed8a..e66620a 100644
--- a/htdocs/exceptions/index.chtml
+++ b/htdocs/exceptions/index.chtml
@@ -1,26 +1,30 @@
1% html(); return; /* vim:set ft=sitecing: */ 1% html(); return; /* vim:set ft=sitecing: */
2%%derive layout = "/ancestry/layout.chtml"; 2%%derive layout = "/ancestry/layout.chtml";
3<%constructor>
4 PN_PREV("/simple","simple page","building a really simple page");
5 PN_NEXT("/exceptions/preprocess","preprocess","preprocessing errors");
6</%constructor>
3<%codemethod string title() %> 7<%codemethod string title() %>
4 return "exceptions handling"; 8 return "exceptions handling";
5</%codemethod> 9</%codemethod>
6<%method void content() %> 10<%method void content() %>
7 <h1>site-C-ing exception handling</h1> 11 <h1>site-C-ing exception handling</h1>
8 <p> 12 <p>
9 The purpose of this section is to give an overview of the <em>site-C-ing</em> 13 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 14 exception handling mechanism. Before the web visitor can see the page each
11 site-C-ing component goes through a few stages, namely, preprocessing, 15 site-C-ing component goes through a few stages, namely, preprocessing,
12 compiling and execution. Having three stages to go through also means the 16 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 17 stages one can fail to go through and three exciting opportunities to handle
14 different errors. 18 different errors.
15 </p> 19 </p>
16 <p> 20 <p>
17 First each component is preprocessed so that you can feed the valid c++ code 21 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 22 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 23 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 24 exception which <em>site-C-ing</em> will catch and pass to <a
21 href="/sources/htdocs/handlers/exception_dev" title="development mode 25 href="/sources/htdocs/handlers/exception_dev" title="development mode
22 exception handler source">the exception handler component</a>. Want to <a 26 exception handler source">the exception handler component</a>. Want to <a
23 href="/exceptions/preprocess">read more</a> about preprocessor exception 27 href="/exceptions/preprocess">read more</a> about preprocessor exception
24 handling? 28 handling?
25 </p> 29 </p>
26 <p> 30 <p>
diff --git a/htdocs/exceptions/preprocess.chtml b/htdocs/exceptions/preprocess.chtml
index 8516139..88b8741 100644
--- a/htdocs/exceptions/preprocess.chtml
+++ b/htdocs/exceptions/preprocess.chtml
@@ -1,28 +1,30 @@
1% html(); return; /* vim:set ft=sitecing: */ 1% html(); return; /* vim:set ft=sitecing: */
2%%derive layout = "/ancestry/layout.chtml"; 2%%derive layout = "/ancestry/layout.chtml";
3<%constructor> 3<%constructor>
4 b_strict = false; 4 b_strict = false;
5 PN_PREV("/exceptions","exceptions","exception handling overview");
6 PN_NEXT("/exceptions/compile","compile-time","compile-time errors");
5</%constructor> 7</%constructor>
6<%codemethod string title() %> 8<%codemethod string title() %>
7 return "preprocessor exceptions handling"; 9 return "preprocessor exceptions handling";
8</%codemethod> 10</%codemethod>
9<%method void content() %> 11<%method void content() %>
10 <h1>site-C-ing preprocessor exception handling</h1> 12 <h1>site-C-ing preprocessor exception handling</h1>
11 <p> 13 <p>
12 It was one of those days when you just can't type right and can't think of 14 It was one of those days when you just can't type right and can't think of
13 what you're typing. It is not unusual that, under such circumstances, you end 15 what you're typing. It is not unusual that, under such circumstances, you end
14 up with a code like <a 16 up with a code like <a
15 href="/view/htdocs/exceptions/development/preprocess.chtml" target="insert" 17 href="/view/htdocs/exceptions/development/preprocess.chtml" target="insert"
16 title="the link opens in the frame below">this</a> -- by the time you were 18 title="the link opens in the frame below">this</a> -- by the time you were
17 about to close your <code>&lt;%code&gt;</code> block you were thinking about 19 about to close your <code>&lt;%code&gt;</code> block you were thinking about
18 some constructor in some component elsewhere in the universe. 20 some constructor in some component elsewhere in the universe.
19 </p> 21 </p>
20 <p> 22 <p>
21 <em>site-C-ing</em> parser will see the inconsistency and throw an exception 23 <em>site-C-ing</em> parser will see the inconsistency and throw an exception
22 which will be caught and passed to <a 24 which will be caught and passed to <a
23 href="/view/htdocs/handlers/exception_dev" target="insert" title="the link 25 href="/view/htdocs/handlers/exception_dev" target="insert" title="the link
24 opens in the frame below">the handler</a>, specified in <a 26 opens in the frame below">the handler</a>, specified in <a
25 href="/view/htdocs/exceptions/development/.scrc" target="insert" title="the 27 href="/view/htdocs/exceptions/development/.scrc" target="insert" title="the
26 link opens in the frame below">the configuration file</a>, which will produce 28 link opens in the frame below">the configuration file</a>, which will produce
27 some nice, human-readable <a href="/exceptions/development/preprocess" 29 some nice, human-readable <a href="/exceptions/development/preprocess"
28 target="insert" title="the link opens in the frame below">output</a>. Well, 30 target="insert" title="the link opens in the frame below">output</a>. Well,
diff --git a/htdocs/exceptions/runtime.chtml b/htdocs/exceptions/runtime.chtml
index d0a8e14..9a72afd 100644
--- a/htdocs/exceptions/runtime.chtml
+++ b/htdocs/exceptions/runtime.chtml
@@ -1,28 +1,30 @@
1% html(); return; /* vim:set ft=sitecing: */ 1% html(); return; /* vim:set ft=sitecing: */
2%%derive layout = "/ancestry/layout.chtml"; 2%%derive layout = "/ancestry/layout.chtml";
3<%constructor> 3<%constructor>
4 b_strict = false; 4 b_strict = false;
5 PN_PREV("/exceptions/compile","compile-time","compile-time errors");
6 PN_NEXT("/sources","sources","source browser");
5</%constructor> 7</%constructor>
6<%codemethod string title() %> 8<%codemethod string title() %>
7 return "runtime exceptions handling"; 9 return "runtime exceptions handling";
8</%codemethod> 10</%codemethod>
9<%method void content() %> 11<%method void content() %>
10 <h1>site-C-ing runtime exception handling</h1> 12 <h1>site-C-ing runtime exception handling</h1>
11 <p> 13 <p>
12 The component may throw an exception while executing and the 14 The component may throw an exception while executing and the
13 <em>site-C-ing</em> will gladly pass it to the handler component which will 15 <em>site-C-ing</em> will gladly pass it to the handler component which will
14 give the user appropriate output (unless it throws an exception itself, of 16 give the user appropriate output (unless it throws an exception itself, of
15 course). Here you will see an example output provided by the handler bundled 17 course). Here you will see an example output provided by the handler bundled
16 with the <em>site-C-ing</em>. 18 with the <em>site-C-ing</em>.
17 </p> 19 </p>
18 20
19 <p> 21 <p>
20 Suppose you have <a href="/view/htdocs/exceptions/development/runtime.chtml" 22 Suppose you have <a href="/view/htdocs/exceptions/development/runtime.chtml"
21 target="insert" title="the link opens in the frame below">a component</a>, 23 target="insert" title="the link opens in the frame below">a component</a>,
22 which at some point throws an exception. Of course, <em>site-C-ing</em> will 24 which at some point throws an exception. Of course, <em>site-C-ing</em> will
23 catch the exception and pass it to <a 25 catch the exception and pass it to <a
24 href="/view/htdocs/handlers/exception_dev" target="insert" title="the link 26 href="/view/htdocs/handlers/exception_dev" target="insert" title="the link
25 opens in the frame below">the handler</a>, specified in <a 27 opens in the frame below">the handler</a>, specified in <a
26 href="/view/htdocs/exceptions/development/.scrc" target="insert" title="the 28 href="/view/htdocs/exceptions/development/.scrc" target="insert" title="the
27 link opens in the frame below">the configuration file</a>, which will produce 29 link opens in the frame below">the configuration file</a>, which will produce
28 some nice, human-readable <a href="/exceptions/development/runtime" 30 some nice, human-readable <a href="/exceptions/development/runtime"