00001 /* Copyright (c) 2005,2007 Vivek Krishna 00002 * Permission is hereby granted, free of charge, to any person obtaining a copy 00003 * of this software and associated documentation files (the "Software"), to deal 00004 * in the Software without restriction, including without limitation the rights 00005 * to use, copy, modify, merge, publish, distribute, sublicense, and/or 00006 * sell copies of the Software, and to permit persons to whom the Software is 00007 * furnished to do so, subject to the following conditions: 00008 * 00009 * The above copyright notice and this permission notice shall be included in 00010 * all copies or substantial portions of the Software. 00011 * 00012 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00013 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00014 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00015 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00016 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00017 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 00018 * IN THE SOFTWARE. */ 00019 00020 #ifndef _XMLPULLPARSEREXCEPTIONH 00021 #define _XMLPULLPARSEREXCEPTIONH 00022 00023 #include <string> 00024 #include <iostream> 00025 #ifdef HAVE_CONFIG_H // 00026 #include <config.h> 00027 #endif 00028 00029 class XmlPullParserException 00030 { 00031 public: 00032 XmlPullParserException (std::string desc, 00033 std::string STATE, 00034 int l, 00035 int c) 00036 :description (desc), 00037 state (STATE) 00038 { 00039 std::cout << "Exception occurred while parsing document" << std::endl; 00040 std::cout << "Exception : " << desc << " during :" << STATE << "at " << l << 00041 ":" << c << std::endl; 00042 line = l; 00043 col = c; 00044 } 00045 ~XmlPullParserException () throw () 00046 { 00047 }; 00048 std::string description, state; 00049 int line, col; 00050 }; 00051 #endif /* */