Written the constructor for exceptions; in the process, added a
metadata slot as a first class slot of exceptions.
This commit is contained in:
parent
f915a9993f
commit
83537391a6
11 changed files with 85 additions and 20 deletions
|
|
@ -86,7 +86,9 @@ struct pso_pointer eval(
|
|||
make_exception( c_cons
|
||||
( c_string_to_lisp_string
|
||||
( L"Can't yet evaluate things of this type: " ),
|
||||
result ), frame_pointer, nil );
|
||||
result ), frame_pointer,
|
||||
c_cons( c_cons( c_string_to_lisp_keyword(L"tag"),
|
||||
get_tag_string(result)), nil), nil );
|
||||
}
|
||||
|
||||
if ( exceptionp( result ) ) {
|
||||
|
|
@ -95,9 +97,8 @@ struct pso_pointer eval(
|
|||
EXCEPTIONTV );
|
||||
|
||||
if ( nilp( x->payload.exception.stack ) ) {
|
||||
inc_ref( result );
|
||||
result =
|
||||
make_exception( x->payload.exception.message, frame_pointer,
|
||||
make_exception( x->payload.exception.message, frame_pointer, nil,
|
||||
result );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ struct pso_pointer c_reverse( struct pso_pointer sequence ) {
|
|||
break;
|
||||
default:
|
||||
result =
|
||||
make_exception( c_string_to_lisp_string
|
||||
( L"Invalid object in sequence" ), nil,
|
||||
nil );
|
||||
make_exception( c_cons( c_string_to_lisp_string
|
||||
( L"Invalid object in sequence" ), cursor), nil,
|
||||
nil , nil);
|
||||
goto exit;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,3 +182,5 @@ struct pso_pointer c_string_to_lisp_keyword( wchar_t *symbol ) {
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue