Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

exitcode.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////////////////
00002 /// \file  exitcode.h
00003 /// \brief Definition of the exit codes returned by the %SPARK solver
00004 ///
00005 /// This header file defines the SPARK::ExitCodes enum that the is returned by the %SPARK
00006 /// solver in case of abnormal execution. The main() driver function returns the value
00007 /// SPARK::ExitCode_OK if the simulation is successful.
00008 ///
00009 /////////////////////////////////////////////////////////////////////////////////////////
00010 ///
00011 /// \author  Dimitri Curtil (LBNL/SRG)
00012 /// \date    June 28, 2002
00013 ///
00014 /////////////////////////////////////////////////////////////////////////////////////////
00015 /// \attention
00016 /// PORTIONS COPYRIGHT (C) 2003 AYRES SOWELL ASSOCIATES, INC. \n
00017 /// PORTIONS COPYRIGHT (C) 2003 THE REGENTS OF THE UNIVERSITY OF CALIFORNIA .
00018 ///   PENDING APPROVAL BY THE US DEPARTMENT OF ENERGY. ALL RIGHTS RESERVED.
00019 ///
00020 /////////////////////////////////////////////////////////////////////////////////////////
00021 
00022  
00023 #if !defined(__EXITCODE_H__)
00024 #define __EXITCODE_H__  
00025 
00026 
00027 /////////////////////////////////////////////////////////////////////////////////////////
00028 namespace SPARK {
00029 
00030         /// \enum  ExitCodes
00031         /// \brief Exit codes returned by the %SPARK solver
00032         enum ExitCodes {
00033 
00034                 // Successful simulation
00035                 ExitCode_OK                          = 0,        ///< successful simulation
00036                 
00037                 /////////////////////////////////////////////////////////////////////////////////////
00038                 // IO errors
00039                 ExitCode_ERROR_IO                    = 100,      ///< error caused by writing to or reading from a file
00040                 ExitCode_ERROR_LEX_SCAN              = 101,      ///< see exit(YY_EXIT_FAILURE) calls in lex_yy.c
00041                 ExitCode_ERROR_URL                   = 102,      ///< error caused by URL engine
00042                 
00043                 /////////////////////////////////////////////////////////////////////////////////////
00044                 // Memory related errors
00045                 ExitCode_ERROR_OUT_OF_MEMORY         = 120,      ///< cannot allocate memory at run-time
00046                 ExitCode_ERROR_NULL_POINTER          = 121,      ///< null pointer accessed somewhere
00047                 
00048                 /////////////////////////////////////////////////////////////////////////////////////
00049                 // Errors in data format
00050                 ExitCode_ERROR_COMMAND_LINE          = 130,      ///< syntax problem
00051                 ExitCode_ERROR_INVALID_RUN_CONTROLS  = 131,      ///< problem in the "*.run" file
00052                 ExitCode_ERROR_INVALID_PREFERENCES   = 132,      ///< problem in the "*.prf" file
00053                 ExitCode_ERROR_INVALID_PROBLEM       = 133,      ///< problem description is invalid
00054 
00055                 /////////////////////////////////////////////////////////////////////////////////////
00056                 // Abnormal exit 
00057                 ExitCode_ERROR_EXIT_SPARK_FACTORY    = 140,  ///< generated by runtime loader
00058 
00059                 /////////////////////////////////////////////////////////////////////////////////////
00060                 // Runtime errors
00061                 ExitCode_ERROR_RUNTIME_ERROR         = 150,  ///< generic runtime error ususally caused by container, adpators, iterators
00062                 ExitCode_ERROR_INVALID_VARIABLE_NAME = 151,  ///< accessing variable by invalid name 
00063                 ExitCode_ERROR_INVALID_FEATURE       = 152,  ///< trying to use a not yet supported feature
00064 
00065                 /////////////////////////////////////////////////////////////////////////////////////
00066                 // The following error codes might get more detailed in future versions.
00067                 ExitCode_ERROR_NUMERICAL             = 160   ///< cannot converge after MaxIterations, singularity, division by zero...
00068                 
00069         };
00070 
00071 }; // namspace SPARK
00072 /////////////////////////////////////////////////////////////////////////////////////////
00073 
00074 
00075 #endif //__EXITCODE_H__
00076 
00077 
00078 


Generated on 5 Nov 2003 for VisualSPARK 2.01