1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _XMLSEARCH_EXCEP_XMLSEARCHEXCEPTIONS_HXX_ 24 #define _XMLSEARCH_EXCEP_XMLSEARCHEXCEPTIONS_HXX_ 25 26 #include <rtl/ustring.hxx> 27 28 29 namespace xmlsearch { 30 31 namespace excep { 32 33 34 class XmlSearchException 35 { 36 public: 37 XmlSearchException(const rtl::OUString & message)38 XmlSearchException( const rtl::OUString& message ) 39 : _message( message ) 40 { 41 } 42 getMessage() const43 rtl::OUString getMessage() const 44 { 45 return _message; 46 } 47 48 49 private: 50 51 rtl::OUString _message; 52 }; 53 54 55 class IOException 56 : public virtual XmlSearchException 57 { 58 public: 59 IOException(const rtl::OUString & message)60 IOException( const rtl::OUString& message ) 61 : XmlSearchException( message ) 62 { 63 } 64 }; 65 66 67 class NoFactoryException 68 : public virtual XmlSearchException 69 { 70 public: NoFactoryException(const rtl::OUString & message)71 NoFactoryException( const rtl::OUString& message ) 72 : XmlSearchException( message ) 73 { 74 } 75 }; 76 77 78 class NoSuchBlock 79 : public virtual XmlSearchException 80 { 81 public: NoSuchBlock(const rtl::OUString & message)82 NoSuchBlock( const rtl::OUString& message ) 83 : XmlSearchException( message ) 84 { 85 } 86 }; 87 88 89 class IllegalIndexException 90 : public virtual XmlSearchException 91 { 92 public: IllegalIndexException(const rtl::OUString & message)93 IllegalIndexException( const rtl::OUString& message ) 94 : XmlSearchException( message ) 95 { 96 } 97 }; 98 99 } 100 } 101 102 103 #endif 104