2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
18 #ifndef FINDER_ERROR_H_
19 #define FINDER_ERROR_H_
21 #include "common/HereMaps_global.h"
23 #include "common/ErrorBase.h"
25 HERE_MAPS_BEGIN_NAMESPACE
28 * This class encapsulates error information reflecting an error that
29 * may arise when a parsing a finder request.
33 class EXPORT_API FinderError : public ErrorBase
38 * This enumeration defines identifiers for the recognized error types.
42 ET_InvalidQueryArguments, ///< Indicates invalid query argument.
43 ET_ParserError, ///< Indicates that an internal parser error occurred.
44 ET_InvalidCredentials, ///< Indicates that credentials are not correct or empty
45 ET_UnknownError ///< Indicate an unkown error
49 * This method is a constructor.
51 * @param sStr A constant reference to a string containing an error message.
53 FinderError(ErrorType etype);
56 * This method is a constructor.
58 * @param aType A value indicating the error type.
60 * @param sDescription A constant reference to a string containing the error
63 FinderError(ErrorType eType, const String& sDescription);
66 * This method is a (virtual) destructor.
68 virtual ~FinderError();
71 * This method retrieves a string representation of the given instance of
74 * @return A string containing the error information held in the given
75 * instance of the class.
77 virtual String ToString() const;
80 * This method sets the error description.
82 * @param sDsc A constant reference to a string containing the
83 * description of the error.
85 void SetDescription(const String& sDsc);
88 * This method retrieves the error description.
90 * @return A constant reference to a string containing the
91 * description of the error.
93 String GetDescription() const;
96 * This method retrieves the error type.
98 * @return A value indicating the error type.
100 ErrorType GetErrorType() const;
103 * This method sets the error type.
105 * @param aType An error type.
107 void SetErrorType(ErrorType aType);
110 HERE_MAPS_NO_COPY_NO_ASSIGN(FinderError);
112 class FinderErrorImpl;
113 FinderErrorImpl* m_pImpl;
116 HERE_MAPS_END_NAMESPACE
118 #endif // FINDER_ERROR_H_