LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
xmlConfigurationFileExceptions.h
Go to the documentation of this file.
1// Copyright 2002-2021 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
16#ifndef XMLCONFIGURATIONFILEEXCEPTIONS_H
17#define XMLCONFIGURATIONFILEEXCEPTIONS_H
18
19#include "common/LimaCommon.h"
20#include <string>
21#include <iostream>
22
23namespace Lima {
24 namespace Common {
25 namespace XMLConfigurationFiles
26 {
27
40
43 {
44 public:
47 explicit NoSuchModule ( const std::string &name ) : XMLConfigurationFileException ( "No such module " + name ), moduleName ( name ) {}
50 NoSuchModule(const NoSuchModule&) = default;
51 virtual ~NoSuchModule() = default;
52 private:
54 const std::string moduleName;
55 };
56
59 {
60 public:
63 NoSuchGroup ( const std::string &name ) : XMLConfigurationFileException ( "No such group " + name ),groupName ( name ) {/*std::cout << "No such group " << name << std::endl;*/}
64 virtual ~NoSuchGroup() throw() = default;
65 NoSuchGroup(const NoSuchGroup&) = default;
66 NoSuchGroup& operator=(const NoSuchGroup&) = delete;
67 private:
69 const std::string groupName;
70 };
71
74 {
75 public:
78 NoSuchAttribute ( const std::string &name ) : XMLConfigurationFileException ( "No such attribute " + name ),attName ( name ) {/*std::cout << "No such attribute " << name << std::endl;*/}
81 virtual ~NoSuchAttribute() throw() {}
82 private:
84 const std::string attName;
85 };
86
89 {
90 public:
93 NoSuchParam ( const std::string &name ) : XMLConfigurationFileException ( "No such param '" + name + "'" ),paramName ( name ) {/*std::cout << "No such param " << name << std::endl;*/}
94 NoSuchParam(const NoSuchParam&) = default;
96 virtual ~NoSuchParam() throw() {}
97 private:
99 const std::string paramName;
100 };
101
104 {
105 public:
108 NoSuchList ( const std::string &name ) : XMLConfigurationFileException ( "No such list " + name ),listName ( name ) {/*std::cout << "No such list " << name << std::endl;*/}
109 NoSuchList(const NoSuchList&) = default;
110 NoSuchList& operator=(const NoSuchList&) = delete;
111 virtual ~NoSuchList() throw() {}
112 private:
114 const std::string listName;
115 };
116
119 {
120 public:
123 NoSuchMap ( const std::string &name ) : XMLConfigurationFileException ( "No such map " + name ),mapName ( name ) {/*std::cout << "No such map " << name << std::endl;*/}
124 NoSuchMap(const NoSuchMap&) = default;
125 NoSuchMap& operator=(const NoSuchMap&) = delete;
126 virtual ~NoSuchMap() throw() {}
127 private:
129 const std::string mapName;
130 };
131
132
133 } // closing namespace Lima
134 } // closing namespace Common
135} // closing namespace XMLConfigurationFiles
136
137#endif
#define LIMA_XMLCONFIGURATIONFILES_EXPORT
Definition LimaCommon.h:137
return a message when an 'attribute' was not found
NoSuchAttribute(const std::string &name)
constructor (send a message was default)
NoSuchAttribute(const NoSuchAttribute &)=default
NoSuchAttribute & operator=(const NoSuchAttribute &)=delete
return a message when a 'group' was not found
NoSuchGroup(const std::string &name)
constructor (send a message was default)
NoSuchList(const std::string &name)
constructor (send a message was default)
NoSuchList & operator=(const NoSuchList &)=delete
NoSuchMap & operator=(const NoSuchMap &)=delete
NoSuchMap(const std::string &name)
constructor (send a message was default)
return a message when a 'module' is not found
NoSuchModule(const NoSuchModule &)=default
NoSuchModule(const std::string &name)
constructor (send a message was default)
NoSuchModule & operator=(const NoSuchModule &)=delete
destructor (throw the exception)
return a message when a 'param' was not found
NoSuchParam & operator=(const NoSuchParam &)=delete
NoSuchParam(const std::string &name)
constructor (send a message was default)
XMLConfigurationFileException & operator=(const XMLConfigurationFileException &)=delete
XMLConfigurationFileException(const XMLConfigurationFileException &)=default
The main LIMA exception class.
Definition LimaCommon.h:262
NAUTITIA.
STL namespace.