Debian Codegraph @

info/gcl/Embedded-Newlines-in-Condition-Reports.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>Embedded Newlines in Condition Reports (ANSI and GNU Common Lisp Document)</title>
7
8 <meta name="description" content="Embedded Newlines in Condition Reports (ANSI and GNU Common Lisp Document)">
9 <meta name="keywords" content="Embedded Newlines in Condition Reports (ANSI and GNU Common Lisp Document)">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
13 <link href="index.html" rel="start" title="Top">
14 <link href="Printing-Conditions.html" rel="up" title="Printing Conditions">
15 <link href="Note-about-Tabs-in-Condition-Reports.html" rel="next" title="Note about Tabs in Condition Reports">
16 <link href="Leading-and-Trailing-Newlines-in-Condition-Reports.html" rel="prev" title="Leading and Trailing Newlines in Condition Reports">
17 <style type="text/css">
18 <!--
19 a.summary-letter {text-decoration: none}
20 blockquote.indentedblock {margin-right: 0em}
21 div.display {margin-left: 3.2em}
22 div.example {margin-left: 3.2em}
23 div.lisp {margin-left: 3.2em}
24 kbd {font-style: oblique}
25 pre.display {font-family: inherit}
26 pre.format {font-family: inherit}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 span.nolinebreak {white-space: nowrap}
30 span.roman {font-family: initial; font-weight: normal}
31 span.sansserif {font-family: sans-serif; font-weight: normal}
32 ul.no-bullet {list-style: none}
33 -->
34 </style>
35
36
37 </head>
38
39 <body lang="en">
40 <span id="Embedded-Newlines-in-Condition-Reports"></span><div class="header">
41 <p>
42 Next: <a href="Note-about-Tabs-in-Condition-Reports.html" accesskey="n" rel="next">Note about Tabs in Condition Reports</a>, Previous: <a href="Leading-and-Trailing-Newlines-in-Condition-Reports.html" accesskey="p" rel="prev">Leading and Trailing Newlines in Condition Reports</a>, Up: <a href="Printing-Conditions.html" accesskey="u" rel="up">Printing Conditions</a> &nbsp; </p>
43 </div>
44 <hr>
45 <span id="Embedded-Newlines-in-Condition-Reports-1"></span><h4 class="subsubsection">9.1.3.4 Embedded Newlines in Condition Reports</h4>
46
47 <p>Especially if it is long, it is permissible and appropriate for
48 a <i>report message</i> to contain one or more embedded <i>newlines</i>.
49 </p>
50 <p>If the calling routine conventionally inserts some additional prefix
51 (such as &ldquo;<tt>Error: </tt>&rdquo; or &ldquo;<tt>;; Error: </tt>&rdquo;) on the first line of
52 the message, it must also assure that an appropriate prefix will be
53 added to each subsequent line of the output, so that the left edge of
54 the message output by the <i>condition reporter</i> will still be properly
55 aligned.
56 </p>
57 <div class="example">
58 <pre class="example"> (defun test ()
59 (error &quot;This is an error message.~%It has two lines.&quot;))
60
61 ;; Implementation A
62 (test)
63 This is an error message.
64 It has two lines.
65
66 ;; Implementation B
67 (test)
68 ;; Error: This is an error message.
69 ;; It has two lines.
70
71 ;; Implementation C
72 (test)
73 &gt;&gt; Error: This is an error message.
74 It has two lines.
75 </pre></div>
76
77
78
79
80 </body>
81 </html>