Skip to content

Latest commit

 

History

History
211 lines (130 loc) · 8.28 KB

scml_base_exception.md

File metadata and controls

211 lines (130 loc) · 8.28 KB

Module scml_base_exception

Scheme base library for exceptions

. __Authors:__ Joseph Wayne Norton ([`norton@alum.mit.edu`](mailto:norton@alum.mit.edu)).

Function Index

'$scml_exports'/0
'error-object-irritants'/1

Returns the list of the irritants encapsulated by the error-object.

.
'error-object-message'/1

Returns the message encapsulated by the error-object.

.
'error-object?'/1

Returns #t if the given object is an object created by error, raised by the read procedure, or raised by the inability to open an input or output port on a file.

.
'file-error?'/1

Returns #t if the given object is an object raised by the inability to open an input or output port on a file.

.
'raise-continuable'/4

Raises an exception by invoking the current exception handler on Obj. The handler is called with the same dynamic environment as the call to raise-continuable, except that: (1) the current exception handler is the one that was in place when the handler being called was installed, and (2) if the handler being called returns, then it will again become the current exception handler. If the handler returns, the values it returns become the values returned by the call to raise-continuable.

.
'read-error?'/1

Returns #t if the given object is an object raised by the read procedure.

.
'with-exception-handler'/5

Returns the results of invoking Thunk. Handler is installed as the current exception handler in the dynamic environment used for the invocation of Thunk. It is an error if Handler does not accept one argument. It is also an error if Thunk does not accept zero arguments.

.
error/4

Raises an exception as if by calling raise on a newly allocated implementation-defined object which encapsulates the information provided by Message, as well as any objects, known as the Irritants. The procedure error-object? must return #t on such objects.

.
raise/4

Raises an exception by invoking the current exception handler on Obj. The handler is called with the same dynamic environment as that of the call to raise, except that the current exception handler is the one that was in place when the handler being called was installed. If the handler returns, a secondary exception is raised in the same dynamic environment as the handler.

.

Function Details

'$scml_exports'/0


'$scml_exports'() -> [{scm_symbol(), scmi_nip()}]



'error-object-irritants'/1


'error-object-irritants'(Error_file::scm_error()) -> [scm_obj()]



Returns the list of the irritants encapsulated by the error-object.

'error-object-message'/1


'error-object-message'(Error_file::scm_error()) -> scm_obj()



Returns the message encapsulated by the error-object.

'error-object?'/1


'error-object?'(Error_file::scm_obj()) -> scm_boolean()



Returns #t if the given object is an object created by error, raised by the read procedure, or raised by the inability to open an input or output port on a file.

'file-error?'/1


'file-error?'(Error_file::scm_obj()) -> scm_boolean()



Returns #t if the given object is an object raised by the inability to open an input or output port on a file.

'raise-continuable'/4


'raise-continuable'(Obj::scm_obj(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_obj()



Raises an exception by invoking the current exception handler on Obj. The handler is called with the same dynamic environment as the call to raise-continuable, except that: (1) the current exception handler is the one that was in place when the handler being called was installed, and (2) if the handler being called returns, then it will again become the current exception handler. If the handler returns, the values it returns become the values returned by the call to raise-continuable.

'read-error?'/1


'read-error?'(Error_read::scm_obj()) -> scm_boolean()



Returns #t if the given object is an object raised by the read procedure.

'with-exception-handler'/5


'with-exception-handler'(Handler::scm_proc(), Thunk::scm_thunk(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_obj()



Returns the results of invoking Thunk. Handler is installed as the current exception handler in the dynamic environment used for the invocation of Thunk. It is an error if Handler does not accept one argument. It is also an error if Thunk does not accept zero arguments.

error/4


error(Irritants::[scm_obj(), ...], Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_obj()



Raises an exception as if by calling raise on a newly allocated implementation-defined object which encapsulates the information provided by Message, as well as any objects, known as the Irritants. The procedure error-object? must return #t on such objects.

raise/4


raise(Obj::scm_obj(), Env::scmi_denv(), Ok::scmi_dok(), Ng::scmi_dng()) -> scm_obj()



Raises an exception by invoking the current exception handler on Obj. The handler is called with the same dynamic environment as that of the call to raise, except that the current exception handler is the one that was in place when the handler being called was installed. If the handler returns, a secondary exception is raised in the same dynamic environment as the handler.