comparison libcruft/misc/lo-error.cc @ 227:1a48a1b91489

[project @ 1993-11-15 10:10:35 by jwe]
author jwe
date Mon, 15 Nov 1993 10:11:59 +0000
parents a592507b3bad
children 780cbbc57b7c
comparison
equal deleted inserted replaced
226:c4027b057786 227:1a48a1b91489
27 27
28 #include <stdio.h> 28 #include <stdio.h>
29 #include <stdlib.h> 29 #include <stdlib.h>
30 #include <stdarg.h> 30 #include <stdarg.h>
31 31
32 #include "liboctave-error.h" 32 #include "lo-error.h"
33 33
34 static
35 liboctave_error_handler default_liboctave_error_handler = liboctave_fatal;
36
37 static
38 liboctave_error_handler current_liboctave_error_handler = liboctave_fatal; 34 liboctave_error_handler current_liboctave_error_handler = liboctave_fatal;
39 35
40 static void 36 static void
41 verror (const char *name, const char *fmt, va_list args) 37 verror (const char *name, const char *fmt, va_list args)
42 { 38 {
52 set_liboctave_error_handler (liboctave_error_handler f) 48 set_liboctave_error_handler (liboctave_error_handler f)
53 { 49 {
54 if (f) 50 if (f)
55 current_liboctave_error_handler = f; 51 current_liboctave_error_handler = f;
56 else 52 else
57 current_liboctave_error_handler = default_liboctave_error_handler; 53 current_liboctave_error_handler = liboctave_fatal;
58 } 54 }
59 55
60 void 56 void
61 liboctave_fatal (const char *fmt, ...) 57 liboctave_fatal (const char *fmt, ...)
62 { 58 {