Go to the first, previous, next, last section, table of contents.


Error Handler for Chartlib

Author(s): Isabel Martín.

Version: 1.10#7 (2006/4/26, 19:22:13 CEST)

Version of last change: 1.9#259 (2003/12/30, 23:55:26 CET)

This module is an error handler. If the format of the arguments is not correct in a call to a chartlib predicate an exception will be thrown . You can wrap the chartlib predicates with the predicates exported by this module to handle automatically the errors if any.

Usage and interface (chartlib_errhandle)

Documentation on exports (chartlib_errhandle)

PREDICATE: chartlib_text_error_protect/1:

chartlib_text_error_protect(G)

This predicate catches the thrown exception and sends it to the appropiate handler. The handler will show the error message in the standard output.

Meta-predicate with arguments: chartlib_text_error_protect(goal).

PREDICATE: chartlib_visual_error_protect/1:

chartlib_visual_error_protect(G)

This predicate catches the thrown exception and sends it to the appropiate handler. The handler will pop up a message box.

Meta-predicate with arguments: chartlib_visual_error_protect(goal).

Documentation on internals (chartlib_errhandle)

REGTYPE: handler_type/1:

handler_type(X)

The library chartlib includes two error handlers already programmed.

handler_type(text).
handler_type(visual).

PREDICATE: error_message/2:

error_message(ErrorCode, ErrorMessage)

Binds the error code with its corresponding text message.

PREDICATE: error_file/2:

error_file(ErrorCode, ErrorFile)

Binds the error code with its corresponding script error file.


Go to the first, previous, next, last section, table of contents.