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 00026 class XmlPullParserException:public std::exception 00027 { 00028 public: 00029 XmlPullParserException (std::string desc, 00030 std::string STATE, 00031 int l, 00032 int c) 00033 :exception (), 00034 description (desc), 00035 state (STATE) 00036 { 00037 std::cout << "Exception occurred while parsing document" << std::endl; 00038 std::cout << "Exception : " << desc << " during :" << STATE << "at " << l << 00039 ":" << c << std::endl; 00040 line = l; 00041 col = c; 00042 } 00043 ~XmlPullParserException () throw () 00044 { 00045 }; 00046 std::string description, state; 00047 int line, col; 00048 }; 00049 #endif /* */