|
|
1.1 root 1: .NH 1
2: What are those funny messages?
3: .PP
4: You probably figured that at some
5: point in this manual you'd
6: see something about error messages.
7: Unfortunately,
8: errors do occur,
9: and some of \*a's error messages
10: can really throw you.
11: Users of other \*a systems have
12: little advantage over \*a novices in this
13: area,
14: for \*u \*a
15: error messages are,
16: in general,
17: nonstandard.
18: To make matters worse,
19: \*a's status messages can
20: be cryptic at times.
21: Thus,
22: in this section we'll
23: explore some of the more common
24: status and error messages.
25: .PP
26: First,
27: some of \*a's less obvious
28: and relatively common
29: abbreviations are:
30: .DS
31: asgn assignment
32: cat catenation
33: crc circle
34: dfmt dyadic format
35: dibm dyadic i-beam
36: exec execute
37: fn function
38: imm immediate
39: iprod inner product
40: mdom monadic domino
41: menc monadic encode
42: miot monadic iota
43: oprod outer product
44: red reduction
45: var variable
46: .DE
47: .PP
48: There are three major types of
49: error messages which may be
50: generated as a result of
51: an \*a session.
52: The error message may be
53: the result of a fatal error
54: in \*a which has caused \*a
55: to abort,
56: the result of some internal
57: problem in \*a,
58: or an error produced by
59: incorrect use of \*a.
60: .NH 2
61: Non-fatal Error Messages
62: .PP
63: Usually,
64: \*a can detect serious errors
65: before they become fatal.
66: When this occurs,
67: it will issue an error message
68: but will not terminate.
69: You can then take
70: appropriate action.
71: Unfortunately,
72: unlike most \*a
73: implementations,
74: \*u \*a
75: does not report the position on
76: the line where the error occurred.
77: However,
78: a traceback from the function in
79: which the error occurred is printed.
80: (See ``The State Indicator''
81: for more information on function
82: tracebacks and error recovery.)
83: .PP
84: As an example of this type of error,
85: it is possible to completely
86: fill up the internal workspace.
87: Usually \*a will not
88: attempt to get more
89: internal workspace memory
90: if it already has the
91: maximum permissible amount.
92: It will then inform you:
93: .sp
94: workspace exceeded
95: .sp
96: Other possible messages
97: of a similar nature are:
98: .DS
99: directory botch
100: save botch
101: elid botch
102: stack overflow
103: pop botch
104: .DE
105: In general,
106: if an error message such
107: as this occurs,
108: you should save your
109: internal workspace
110: in a different file
111: than you started from
112: (in case it may
113: have been ``corrupted''
114: or otherwise damaged
115: by the error in \*a),
116: and then should exit
117: \*a and restart.
118: You can then determine
119: whether or not anything
120: happened to your workspace,
121: and can recover any losses
122: from the original workspace file.
123: These type of errors generally
124: occur as the result of some other
125: error,
126: such as a function which
127: calls itself indefinitely
128: or declaring an array which
129: is too large for the workspace.
130: .PP
131: By far,
132: majority of non-fatal error messages
133: produced by \*a are
134: not serious,
135: but simply indicate
136: some error in the
137: definition or execution
138: of a function.
139: These errors fall into
140: some common types:
141: .IP "conformability" 20
142: The variable which you are
143: passing to a function or
144: operator does not ``conform''.
145: That is,
146: it is not the proper shape
147: (e.g. array has the wrong number of
148: dimensions or a scalar
149: is used instead of an array, etc.)
150: For example,
151: trying to add a 2X2
152: array to a 2-element
153: vector will produce
154: this error.
155: .IP "botch" 20
156: A ``botch'' can occur for
157: several reasons.
158: Attempting to read a
159: non-existant
160: element of an array
161: will produce a
162: ``getdat botch''.
163: (Storing into a
164: non-existant variable
165: or array element will
166: produce a ``putdat botch''.)
167: .IP "domain" 20
168: A domain error means that
169: somehow the variable passed
170: to a function or operator
171: cannot be used.
172: For example,
173: attempting to take
174: the logarithm of
175: a negative number will
176: produce a
177: ``log domain''
178: error message.
179: .IP "index" 20
180: A bad index was specified.
181: A quick example of this
182: error is to have origin=1
183: and attempt to access
184: A[0].
185: Attempting to concatenate
186: two arrays along a
187: non-existant dimension
188: will produce a
189: ``cat index''
190: error message.
191: .IP "syntax" 20
192: This error message is
193: probably painfully
194: familiar \(em
195: it indicates that
196: the indicated \*a
197: expression was not
198: syntactically correct.
199: If this error occurs
200: during the processing
201: of a function,
202: the traceback
203: will show which line
204: was incorrect.
205: .IP "rank" 20
206: This type of error
207: indicates that the
208: argument to an operator
209: or function has
210: the wrong number of
211: dimensions.
212: As an example,
213: if you attempt to declare
214: an array with more than
215: 8 dimensions,
216: you will get a
217: ``max rank''
218: error message.
219: .PP
220: Some other common error
221: messages do not fall into
222: any of the above classes.
223: These include:
224: .IP "used before set" 20
225: This message means that a variable
226: was referenced which had not
227: yet been defined.
228: An easy example:
229: .DS
230: y { 2
231: z { x + y
232: x: used before set
233: .DE
234: .IP "no fn result" 20
235: This error occurs when an
236: attempt is made to use the
237: returned value of a function
238: which doesn't return a value.
239: As an example, if the
240: function ``xyz'' returns
241: no value, then the following
242: sequence will result in an error:
243: .DS
244: z { xyz
245: no fn result
246: .DE
247: .IP "si damage" 20
248: This error message,
249: discussed earlier,
250: usually occurs when
251: an attempt is made to
252: edit a function which
253: is suspended due to
254: an error.
255: Type ``)reset'' and
256: then you may edit
257: the function.
258: .IP "can't open file" 20
259: This error message occurs when
260: a non-existant file is
261: used for a ``)load'',
262: ``)read'',
263: ``)save'',
264: etc.
265: .IP "not a fn" 20
266: In most cases,
267: an attempt to use a function
268: which has not been defined,
269: or which has been defined as
270: a variable,
271: will result in a ``syntax error.''
272: There are some special
273: circumstances
274: in which this error will slip
275: past the ordinary error-checking code.
276: In the event this occurs,
277: the message ``name: not a fn''
278: will be printed.
279: .NH 2
280: Fatal Error Messages
281: .PP
282: In most cases,
283: when \*a detects that
284: some irreparable damage
285: has been done,
286: it will print an error
287: message of the form:
288: .sp
289: fatal signal: message
290: .sp
291: where the ``message'' represents a
292: type of \*u termination.
293: The most common one probably is
294: ``segmentation violation'',
295: which means that \*a needed too
296: much memory for its
297: internal workspace
298: and was aborted in its attempt to
299: get more than permitted in \*u.
300: Other possible messages include:
301: .DS
302: quit
303: illegal instruction
304: trace trap
305: emt trap
306: bus error
307: bad sys call
308: write no pipe
309: .DE
310: Despite the severity of the error,
311: \*a attempts to dump the workspace
312: into a file named ``aplws.abort''
313: in order to facilitate recovery.
314: This file should be viewed with suspicion.
315: If another fatal signal occurs while
316: this dump is being performed,
317: \*a will abort immediately,
318: without completely writing the file.
319: Even if the dump was successful,
320: the file format may not be internally
321: consistent since \*a was probably
322: changing something when it was forced to abort.
323: It is therefore advised that
324: you restart \*a and recover
325: any information you need from this dump file,
326: writing that information into a new workspace
327: (see the description of the ``)vsave''
328: system command in Appendix B).
329: .I Never
330: copy ``aplws.abort'' into your original
331: workspace file without thoroughly
332: checking it out.
333: .PP
334: In some rare cases,
335: \*a is unable to
336: print a termination message,
337: and the system aborts it.
338: This usually will result in a
339: message such as:
340: .sp
341: Memory fault -- core dumped
342: .sp
343: and the operating system
344: will produce a file named
345: ``core'' in your directory.
346: This file is probably useless
347: and you can delete it with:
348: .sp
349: $ rm core
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.