1*565d668cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*565d668cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*565d668cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*565d668cSAndrew Rist  * distributed with this work for additional information
6*565d668cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*565d668cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*565d668cSAndrew Rist  * "License"); you may not use this file except in compliance
9*565d668cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*565d668cSAndrew Rist  *
11*565d668cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*565d668cSAndrew Rist  *
13*565d668cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*565d668cSAndrew Rist  * software distributed under the License is distributed on an
15*565d668cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*565d668cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*565d668cSAndrew Rist  * specific language governing permissions and limitations
18*565d668cSAndrew Rist  * under the License.
19*565d668cSAndrew Rist  *
20*565d668cSAndrew Rist  *************************************************************/
21*565d668cSAndrew Rist 
22*565d668cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef INCLUDED_RTL_MALFORMEDURIEXCEPTION_HXX
25cdf0e10cSrcweir #define INCLUDED_RTL_MALFORMEDURIEXCEPTION_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "rtl/ustring.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir namespace rtl {
30cdf0e10cSrcweir 
31cdf0e10cSrcweir /** An exception indicating a malformed URI.
32cdf0e10cSrcweir 
33cdf0e10cSrcweir     <P>Used when parsing (part of) a URI fails for syntactical reasons.</P>
34cdf0e10cSrcweir  */
35cdf0e10cSrcweir class SAL_EXCEPTION_DLLPUBLIC_EXPORT MalformedUriException
36cdf0e10cSrcweir {
37cdf0e10cSrcweir public:
38cdf0e10cSrcweir     /** Create a MalformedUriException.
39cdf0e10cSrcweir 
40cdf0e10cSrcweir         @param rMessage
41cdf0e10cSrcweir         A message containing any details about the exception.
42cdf0e10cSrcweir      */
MalformedUriException(rtl::OUString const & rMessage)43cdf0e10cSrcweir     inline SAL_EXCEPTION_DLLPRIVATE MalformedUriException(
44cdf0e10cSrcweir         rtl::OUString const & rMessage): m_aMessage(rMessage) {}
45cdf0e10cSrcweir 
MalformedUriException(MalformedUriException const & other)46cdf0e10cSrcweir     inline SAL_EXCEPTION_DLLPRIVATE MalformedUriException(
47cdf0e10cSrcweir         MalformedUriException const & other): m_aMessage(other.m_aMessage) {}
48cdf0e10cSrcweir 
~MalformedUriException()49cdf0e10cSrcweir     inline SAL_EXCEPTION_DLLPRIVATE ~MalformedUriException() {}
50cdf0e10cSrcweir 
operator =(MalformedUriException const & rOther)51cdf0e10cSrcweir     inline SAL_EXCEPTION_DLLPRIVATE MalformedUriException operator =(
52cdf0e10cSrcweir         MalformedUriException const & rOther)
53cdf0e10cSrcweir     { m_aMessage = rOther.m_aMessage; return *this; }
54cdf0e10cSrcweir 
55cdf0e10cSrcweir     /** Get the message.
56cdf0e10cSrcweir 
57cdf0e10cSrcweir         @return
58cdf0e10cSrcweir         A reference to the message.  The reference is valid for the lifetime of
59cdf0e10cSrcweir         this MalformedUriException.
60cdf0e10cSrcweir      */
getMessage() const61cdf0e10cSrcweir     inline SAL_EXCEPTION_DLLPRIVATE rtl::OUString const & getMessage() const
62cdf0e10cSrcweir     { return m_aMessage; }
63cdf0e10cSrcweir 
64cdf0e10cSrcweir private:
65cdf0e10cSrcweir     rtl::OUString m_aMessage;
66cdf0e10cSrcweir };
67cdf0e10cSrcweir 
68cdf0e10cSrcweir }
69cdf0e10cSrcweir 
70cdf0e10cSrcweir #endif // INCLUDED_RTL_MALFORMEDURIEXCEPTION_HXX
71