From c381dbe318c3a50322b2d0db7f395b8375b1fb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Thu, 18 Feb 2016 19:46:03 +0000 Subject: [PATCH] ISO error handling (Paulo Moura's suite). --- include/YapErrors.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/YapErrors.h b/include/YapErrors.h index f749a6ced..070a54323 100644 --- a/include/YapErrors.h +++ b/include/YapErrors.h @@ -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")