ISO error handling (Paulo Moura's suite).

This commit is contained in:
Vítor Santos Costa 2016-02-18 19:46:03 +00:00
parent 56024b2a2c
commit c381dbe318

View File

@ -1,10 +1,12 @@
///
/// @file YapErrors.h
///
/// @adddtogroup YapError
///
/// The file YapErrors.h contains a list with all the error classes known internally to the YAP system.
/// The file YapErrors.h contains a list with all the error classes known
/// internally to the YAP system.
BEGIN_ERROR_CLASSES()
@ -13,27 +15,27 @@ ECLASS(NO_ERROR, "no_error", 0)
/// bad domain, first argument often is the predicate.
ECLASS(DOMAIN_ERROR, "domain_error", 2)
/// bad arithmetic
ECLASS(EVALUATION_ERROR, "evaluation_error", 2)
ECLASS(EVALUATION_ERROR, "evaluation_error", 1)
/// missing object (I/O mostly)
ECLASS(EXISTENCE_ERROR, "existence_error", 2)
/// should be bound
ECLASS(INSTANTIATION_ERROR_CLASS, "instantiation_error", 0)
ECLASS(INSTANTIATION_ERROR_CLASS, "instantiation_error", 0)
/// bad access, I/O
ECLASS(PERMISSION_ERROR, "permission_error", 3)
/// something that could not be represented into a type
ECLASS(REPRESENTATION_ERROR, "representation_error", 2)
ECLASS(REPRESENTATION_ERROR, "representation_error", 2)
/// not enough ....
ECLASS(RESOURCE_ERROR, "resource_error", 2)
/// bad text
ECLASS(SYNTAX_ERROR_CLASS, "syntax_error", 1)
/// OS or internal
ECLASS(SYSTEM_ERROR_CLASS, "system_error", 2)
ECLASS(SYSTEM_ERROR_CLASS, "system_error", 2)
/// bad typing
ECLASS(TYPE_ERROR, "type_error", 2)
/// should be unbound
ECLASS(UNINSTANTIATION_ERROR_CLASS, "uninstantiation_error", 1)
/// escape hatch
ECLASS(EVENT, "event", 2)
ECLASS(EVENT, "event", 2)
END_ERROR_CLASSES();
@ -44,7 +46,7 @@ BEGIN_ERRORS()
E0(YAP_NO_ERROR, NO_ERROR) /// default state
E(DOMAIN_ERROR_ABSOLUTE_FILE_NAME_OPTION, DOMAIN_ERROR,
"absolute_file_name_option")
"absolute_file_name_option")
E(DOMAIN_ERROR_ARRAY_OVERFLOW, DOMAIN_ERROR, "array_overflow")
E(DOMAIN_ERROR_ARRAY_TYPE, DOMAIN_ERROR, "array_type")
E(DOMAIN_ERROR_CLOSE_OPTION, DOMAIN_ERROR, "close_option")