/*
 * kp_errors_define_decl.txt - describe errors, then used in enum and array.
 * This file is part of PetrSU KP Library.
 *
 * Copyright (C) 2009 - Alexander A. Lomov. All rights reserved.
 *
 * PetrSU KP Library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * PetrSU KP Library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with PetrSU KP Library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

/*
 * KP_ERROR_DECLARATION - name of macros.
 * First parameters - representation of error in source code, using for enum.
 * Second - value for enum.
 * Third - Error text.
 */

KP_ERROR_DECLARATION( ERROR_NO,         = 0,    "" )
KP_ERROR_DECLARATION( ERROR_UNKNOWN,    = -1,   "Unknown error." )

/* Memory errors = 2 */
KP_ERROR_DECLARATION( ERROR_OUT_OF_MEMORY, = 100, "Out of memory." )

/* Errors for OWL-entities = 3 */
KP_ERROR_DECLARATION( ERROR_INCORRECT_CLASS,        = 200,  "Incorrect class structure." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_ENTITY,       ,       "Incorrect entity structure." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_CLASSTYPE,    ,       "Incorrect type of class." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_INDIVIDUAL,   ,       "Incorrect individual structure" )
KP_ERROR_DECLARATION( ERROR_INCORRECT_PROPERTY,     ,       "Incorrect property structure." )
KP_ERROR_DECLARATION( ERROR_SS_NO_INDIVIDUAL,       ,       "No individual in SS, no triples described it." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_UUID,         ,       "Incorrect identifier of individual." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_TEMPLATE,     ,       "Incorrect template: class or individual." )

/* Errors associated with properties = 11 */
KP_ERROR_DECLARATION( ERROR_INCORRECT_PROPERTY_NAME,    = 300,  "Incorrect name of property." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_PROPERTY_ABOUT,   ,       "Incorrect about field of property." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_PROPERTY_VALUE,   ,       "Incorrect property value(incorrect value type)." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_PROPERTY_TYPE,    ,       "Wrong property type: datatypeproperty, objectproperty." )
KP_ERROR_DECLARATION( ERROR_CANT_FIND_PROPERTY,         ,       "No property in the class or individual." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_PROPLIST,         ,       "Property list has incorrect data(properties)." )

/* Cardinality errors */
KP_ERROR_DECLARATION( ERROR_MINCARDINALITY_VIOLATED,    = 400,  "Minimal cardinality violated." )
KP_ERROR_DECLARATION( ERROR_MAXCARDINALITY_VIOLATED,    ,       "Maximal cardinality violated." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_CARDINALITY,      ,       "Incorrect set cardinality restriction." )

/* Triples errors */
KP_ERROR_DECLARATION( ERROR_INCORRECT_TRIPLE_SUBJECT,    = 500, "Incorrect subjet of triple." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_TRIPLE_OBJECT,     ,      "Incorrect object of triple." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_TRIPLE_PREDICATE,  ,      "Incorrect prdicate of triple." )

/* Subscribe errors */
KP_ERROR_DECLARATION( ERROR_INCORRECT_SUBSCR_CONTAINER, = 600, "Incorrect subscribe container." )
KP_ERROR_DECLARATION( ERROR_INCORRECT_SUBSCR_CONTAINER_RTTI_TYPE, , "Incorrect subscribe container RTTI type." )

/* Network errors */
KP_ERROR_DECLARATION( ERROR_CONNECTION_REFUSED, = 700,  "Connection refused by server." )
KP_ERROR_DECLARATION( ERROR_TIMEOUT,            ,       "Time out for response from server." )

/* Ontology limitations errors */
KP_ERROR_DECLARATION( ERROR_INDIVIDUALS_LIMIT_EXCEEDED,             = 800,    "Reached limit of individual for all ontology." )
KP_ERROR_DECLARATION_LAST( ERROR_CLASS_INDIVIDUALS_LIMIT_EXCEEDED,  ,         "Reached limit of individual for class." )
