mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
WIP - Cyc_raise
This commit is contained in:
parent
04c11eabfb
commit
7f82bf2617
1 changed files with 19 additions and 0 deletions
19
runtime.h
19
runtime.h
|
@ -80,6 +80,7 @@ static string_type Cyc_string_append_va_list(int, object, va_list);
|
||||||
//static object Cyc_error_va(int count, object obj1, va_list ap);
|
//static object Cyc_error_va(int count, object obj1, va_list ap);
|
||||||
static list mcons(object,object);
|
static list mcons(object,object);
|
||||||
static object terpri(void);
|
static object terpri(void);
|
||||||
|
//object Cyc_raise(object);
|
||||||
static object Cyc_display(object);
|
static object Cyc_display(object);
|
||||||
static object Cyc_write(object);
|
static object Cyc_write(object);
|
||||||
static object Cyc_is_boolean(object o);
|
static object Cyc_is_boolean(object o);
|
||||||
|
@ -200,6 +201,24 @@ static object Cyc_default_exception_handler(int argc, closure _, object err) {
|
||||||
exit(1);
|
exit(1);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Provide the ability to raise an exception from the C runtime.
|
||||||
|
Other runtime functions should call this as needed
|
||||||
|
|
||||||
|
TODO: consolidate this with (raise) in trans.scm ????
|
||||||
|
* /
|
||||||
|
TODO:
|
||||||
|
object Cyc_raise(object err) {
|
||||||
|
// TODO: probably best to re-arrange things to not rely on a global here
|
||||||
|
object ehs = (object) __glo__85exception_91handler_91stack_85;
|
||||||
|
if (boolean_f == ehs) {
|
||||||
|
Cyc_default_exception_handler(1, (closure)err, err);
|
||||||
|
} else {
|
||||||
|
// TODO: call into just like (raise) car(ehs)
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
} */
|
||||||
|
|
||||||
/* END exception handler */
|
/* END exception handler */
|
||||||
|
|
||||||
/* Global variables. */
|
/* Global variables. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue