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