kealib
Loading...
Searching...
No Matches
KEAException.h
Go to the documentation of this file.
1/*
2 * KEAException.cpp
3 * LibKEA
4 *
5 * Created by Pete Bunting on 02/07/2012.
6 * Copyright 2012 LibKEA. All rights reserved.
7 *
8 * This file is part of LibKEA.
9 *
10 * Permission is hereby granted, free of charge, to any person
11 * obtaining a copy of this software and associated documentation
12 * files (the "Software"), to deal in the Software without restriction,
13 * including without limitation the rights to use, copy, modify,
14 * merge, publish, distribute, sublicense, and/or sell copies of the
15 * Software, and to permit persons to whom the Software is furnished
16 * to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be
19 * included in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
25 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
26 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 *
29 */
30
31#ifndef KEAException_H
32#define KEAException_H
33
34#include <exception>
35#include <iostream>
36#include <string>
37
38namespace kealib
39{
40 class KEA_EXPORT KEAException : public std::exception
41 {
42 public:
43 KEAException() : exception() {msgs = "A KEAException has been created.";};
44 KEAException(const char *message) noexcept : exception() {msgs = std::string(message);};
45 KEAException(std::string message) noexcept : exception() {msgs = message;};
46 virtual ~KEAException() throw() {};
47 virtual const char* what() const throw() {return msgs.c_str();}
48 protected:
49 std::string msgs;
50 };
51
52 class KEA_EXPORT KEAIOException : public KEAException
53 {
54 public:
55 KEAIOException() : KEAException("KEAIOException has been created."){};
56 KEAIOException(const char* message) : KEAException(message){};
57 KEAIOException(std::string message) : KEAException(message){};
58 ~KEAIOException() throw() {};
59 };
60
61 class KEA_EXPORT KEAATTException : public KEAException
62 {
63 public:
64 KEAATTException() : KEAException("KEAATTException has been created."){};
65 KEAATTException(const char* message) : KEAException(message){};
66 KEAATTException(std::string message) : KEAException(message){};
67 ~KEAATTException() throw() {};
68 };
69
70
71}
72
73
74#endif
Definition KEAException.h:62
KEAATTException(std::string message)
Definition KEAException.h:66
~KEAATTException()
Definition KEAException.h:67
KEAATTException(const char *message)
Definition KEAException.h:65
KEAATTException()
Definition KEAException.h:64
Definition KEAException.h:41
KEAException(std::string message) noexcept
Definition KEAException.h:45
std::string msgs
Definition KEAException.h:49
virtual ~KEAException()
Definition KEAException.h:46
virtual const char * what() const
Definition KEAException.h:47
KEAException()
Definition KEAException.h:43
KEAException(const char *message) noexcept
Definition KEAException.h:44
Definition KEAException.h:53
KEAIOException(const char *message)
Definition KEAException.h:56
KEAIOException()
Definition KEAException.h:55
~KEAIOException()
Definition KEAException.h:58
KEAIOException(std::string message)
Definition KEAException.h:57
Definition KEAAttributeTable.h:45