update benz (exception API refactoring)
This commit is contained in:
parent
1388887754
commit
6fdf082bdd
|
@ -1 +1 @@
|
||||||
Subproject commit 1b36b5d2ff702df5f6bd7c1a8bc19633fc9ad244
|
Subproject commit a7c2933e01152101ee2abc15bb75b035d4dafd74
|
|
@ -255,11 +255,11 @@
|
||||||
raise
|
raise
|
||||||
raise-continuable
|
raise-continuable
|
||||||
error
|
error
|
||||||
|
make-error-object
|
||||||
error-object?
|
error-object?
|
||||||
error-object-message
|
error-object-message
|
||||||
error-object-irritants
|
error-object-irritants
|
||||||
read-error?
|
error-object-type)
|
||||||
file-error?)
|
|
||||||
|
|
||||||
(export procedure?
|
(export procedure?
|
||||||
apply
|
apply
|
||||||
|
|
|
@ -463,6 +463,14 @@
|
||||||
|
|
||||||
;; 6.11. Exceptions
|
;; 6.11. Exceptions
|
||||||
|
|
||||||
|
(define (read-error? obj)
|
||||||
|
(and (error-object? obj)
|
||||||
|
(eq? (error-object-type obj) 'read)))
|
||||||
|
|
||||||
|
(define (file-error? obj)
|
||||||
|
(and (error-object? obj)
|
||||||
|
(eq? (error-object-type obj) 'file)))
|
||||||
|
|
||||||
(export with-exception-handler
|
(export with-exception-handler
|
||||||
raise
|
raise
|
||||||
raise-continuable
|
raise-continuable
|
||||||
|
|
|
@ -69,7 +69,7 @@ main(int argc, char *argv[], char **envp)
|
||||||
pic_funcall(pic, PICRIN_MAIN, "main", pic_nil_value());
|
pic_funcall(pic, PICRIN_MAIN, "main", pic_nil_value());
|
||||||
}
|
}
|
||||||
pic_catch {
|
pic_catch {
|
||||||
pic_print_backtrace(pic, pic->err);
|
pic_print_backtrace(pic);
|
||||||
status = 1;
|
status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue