chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sh / report
1 ;
2 ; report.sh
3 ;
4 ; A simple report box handler
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sapphire library.
12 ;
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
16 ; any later version.
17 ;
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 ; GNU General Public License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire.  If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ;  report_register
32 ;  report_catchAll
33 ;  report_error
34
35                 [       :LNOT::DEF:report__dfn
36                 GBLL    report__dfn
37
38 ; --- report_register ---
39 ;
40 ; On entry:     R0 == pointer to routine to use
41 ;               R1 == R12 to pass to the routine
42 ;               R2 == stack pointer to set when it gets control
43 ;
44 ; On exit:      --
45 ;
46 ; Use:          Registers a resume point so that the application can recover
47 ;               from errors.  Error messages are reported using errorBox.
48
49                 IMPORT  report_register
50
51 ; --- report_catchAll ---
52 ;
53 ; On entry:     --
54 ;
55 ; On exit:      R13 modified
56 ;
57 ; Use:          Sets up an exception handler to catch errors and other SEH
58 ;               exceptions.  Errors are reported in the usual way, and the
59 ;               user is given the option to close the application.  Other
60 ;               exceptions are reported as errors.
61
62                 IMPORT  report_catchAll
63
64 ; --- report_error ---
65 ;
66 ; On entry:     R0 == pointer to error
67 ;
68 ; On exit:      --
69 ;
70 ; Use:          Prompts the user about quitting the application in response
71 ;               to a really bad error.  If the user decides to quit, we
72 ;               quit.  Otherwise we return.
73
74                 IMPORT  report_error
75
76                 ]
77
78 ;----- That's all, folks ----------------------------------------------------
79
80                 END