Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
LuceneException.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef LUCENEEXCEPTION_H
8#define LUCENEEXCEPTION_H
9
10#include "Lucene.h"
11
12namespace Lucene {
13
15class LPPAPI LuceneException : public std::exception {
16public:
47
48 LuceneException(const String& error = EmptyString, LuceneException::ExceptionType type = Null) throw();
50
51protected:
53 String error;
54
55 std::string _what;
56
57public:
58 ExceptionType getType() const;
59 String getError() const;
60 bool isNull() const;
61 void throwException();
62
63 virtual const char* what() const throw();
64};
65
66template <class ParentException, LuceneException::ExceptionType Type>
67class LPPAPI ExceptionTemplate : public ParentException {
68public:
69 ExceptionTemplate(const String& error = EmptyString, LuceneException::ExceptionType type = Type) : ParentException(error, type) {
70 }
71};
72
100}
101
102#endif
Definition LuceneException.h:67
ExceptionTemplate(const String &error=EmptyString, LuceneException::ExceptionType type=Type)
Definition LuceneException.h:69
Lucene exception container.
Definition LuceneException.h:15
LuceneException(const String &error=EmptyString, LuceneException::ExceptionType type=Null)
ExceptionType
Definition LuceneException.h:17
@ StopFillCache
Definition LuceneException.h:41
@ FileNotFound
Definition LuceneException.h:23
@ IndexOutOfBounds
Definition LuceneException.h:26
@ NullPointer
Definition LuceneException.h:34
@ IllegalArgument
Definition LuceneException.h:24
@ LockObtainFailed
Definition LuceneException.h:28
@ OutOfMemory
Definition LuceneException.h:36
@ FieldReader
Definition LuceneException.h:22
@ Merge
Definition LuceneException.h:32
@ NumberFormat
Definition LuceneException.h:35
@ QueryParser
Definition LuceneException.h:38
@ AlreadyClosed
Definition LuceneException.h:19
@ StaleReader
Definition LuceneException.h:40
@ Compression
Definition LuceneException.h:20
@ IO
Definition LuceneException.h:27
@ MergeAborted
Definition LuceneException.h:31
@ Parse
Definition LuceneException.h:37
@ TooManyClauses
Definition LuceneException.h:44
@ TimeExceeded
Definition LuceneException.h:43
@ CorruptIndex
Definition LuceneException.h:21
@ Runtime
Definition LuceneException.h:39
@ NoSuchDirectory
Definition LuceneException.h:33
@ Temporary
Definition LuceneException.h:42
@ Null
Definition LuceneException.h:18
@ Lookahead
Definition LuceneException.h:30
@ IllegalState
Definition LuceneException.h:25
@ LockReleaseFailed
Definition LuceneException.h:29
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net