rpaerror.h
Go to the documentation of this file.
00001 /*
00002  *  Regular Pattern Analyzer Toolkit (RPA/Tk)
00003  *  Copyright (c) 2009-2012 Martin Stoilov
00004  *
00005  *  This program is free software: you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation, either version 3 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  *  Martin Stoilov <martin@rpasearch.com>
00019  */
00020 
00030 #ifndef _RPAERROR_H_
00031 #define _RPAERROR_H_
00032 
00033 #include "rtypes.h"
00034 
00035 #define RPA_ERRINFO_NONE 0                              
00036 #define RPA_ERRINFO_CODE (1<<0)                 
00037 #define RPA_ERRINFO_OFFSET (1<<1)               
00038 #define RPA_ERRINFO_LINE (1<<2)                 
00039 #define RPA_ERRINFO_RULEUID (1<<3)              
00040 #define RPA_ERRINFO_NAME (1<<4)                 
00043 #define RPA_E_NONE 0                                    
00044 #define RPA_E_OUTOFMEM 1001                             
00045 #define RPA_E_NOTCOMPILED 1002                  
00046 #define RPA_E_NOTOPEN 1003                              
00047 #define RPA_E_NOTCLOSED 1004                    
00048 #define RPA_E_NOTFOUND 1005                             
00049 #define RPA_E_SYNTAXERROR 1006                  
00050 #define RPA_E_UNRESOLVEDSYMBOL 1007             
00051 #define RPA_E_PARAM 1008                                
00052 #define RPA_E_COMPILE 1009                              
00054 #define RPA_E_EXECUTION 2001                    
00055 #define RPA_E_USERABORT 2002                    
00056 #define RPA_E_RULEABORT 2003                    
00057 #define RPA_E_INVALIDINPUT 2004                 
00062 typedef struct rpa_errinfo_s rpa_errinfo_t;
00063 
00068 struct rpa_errinfo_s {
00077         unsigned long mask;
00078 
00085         long code;
00086 
00090         long offset;
00091 
00095         long line;
00096 
00101         long ruleuid;
00102 
00106         char name[128];
00107 };
00108 
00109 
00110 #endif