Diffstat (limited to 'htdocs/exceptions/runtime.chtml') (more/less context) (ignore whitespace changes)
-rw-r--r-- | htdocs/exceptions/runtime.chtml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/htdocs/exceptions/runtime.chtml b/htdocs/exceptions/runtime.chtml new file mode 100644 index 0000000..d0a8e14 --- a/dev/null +++ b/htdocs/exceptions/runtime.chtml | |||
@@ -0,0 +1,47 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | ||
2 | %%derive layout = "/ancestry/layout.chtml"; | ||
3 | <%constructor> | ||
4 | b_strict = false; | ||
5 | </%constructor> | ||
6 | <%codemethod string title() %> | ||
7 | return "runtime exceptions handling"; | ||
8 | </%codemethod> | ||
9 | <%method void content() %> | ||
10 | <h1>site-C-ing runtime exception handling</h1> | ||
11 | <p> | ||
12 | 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 | ||
14 | 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 | ||
16 | with the <em>site-C-ing</em>. | ||
17 | </p> | ||
18 | |||
19 | <p> | ||
20 | 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>, | ||
22 | which at some point throws an exception. Of course, <em>site-C-ing</em> will | ||
23 | catch the exception and pass it to <a | ||
24 | href="/view/htdocs/handlers/exception_dev" target="insert" title="the link | ||
25 | opens in the frame below">the handler</a>, specified in <a | ||
26 | href="/view/htdocs/exceptions/development/.scrc" target="insert" title="the | ||
27 | link opens in the frame below">the configuration file</a>, which will produce | ||
28 | some nice, human-readable <a href="/exceptions/development/runtime" | ||
29 | target="insert" title="the link opens in the frame below">output</a>. Well, | ||
30 | you may not wish to give out all this information in the production | ||
31 | environment, so you just put in your <a | ||
32 | href="/view/htdocs/exceptions/production/.scrc" target="insert" title="the | ||
33 | link opens in the frame below">configuration file</a> some <a | ||
34 | href="/view/htdocs/handlers/exception_prod" target="insert" title="the link | ||
35 | opens in the frame below">different handler</a>, which just gives user <a | ||
36 | href="/exceptions/production/runtime" target="insert" title="the link opens | ||
37 | in the frame below">a friendly yet lame excuse</a>. | ||
38 | </p> | ||
39 | |||
40 | <div class="insert"> | ||
41 | <iframe id="insert" name="insert" src="about:blank" width="95%" height="300"> | ||
42 | <p>I wanted to put an <iframe> here, but your browser does not seem to | ||
43 | support it. That is okay, it still will open links somehow.</p> | ||
44 | </iframe> | ||
45 | </div> | ||
46 | |||
47 | </%method> | ||