UnexpectedEnumValueException.cpp
Go to the documentation of this file.
1
#include "
UnexpectedEnumValueException.h
"
2
#include "
MissingRequiredPropertyException.h
"
3
4
#include <Ice/Properties.h>
5
6
7
namespace
armarx::exceptions::local
8
{
9
10
UnexpectedEnumValueException::UnexpectedEnumValueException
(
11
const
std::string& enumName,
int
value
) :
12
armarx
::LocalException(
"Unexpected value of enum "
+ enumName +
": "
13
+
std
::
to_string
(
value
)),
14
enumName(enumName),
value
(
value
)
15
{}
16
17
const
std::string&
UnexpectedEnumValueException::getEnumName
()
const
18
{
19
return
enumName;
20
}
21
22
int
UnexpectedEnumValueException::getValue
()
const
23
{
24
return
value;
25
}
26
27
MissingRequiredPropertyException::MissingRequiredPropertyException
(std::string propertyName,
Ice::PropertiesPtr
const
& properties)
28
: propertyName(propertyName)
29
{
30
std::stringstream
str
;
31
str
<<
" Missing required property <"
+
propertyName
+
">"
;
32
33
if
(properties)
34
{
35
str
<<
"\nAvailable Properties: "
<< properties->getPropertiesForPrefix(
""
);
36
}
37
38
setReason(
str
.str());
39
}
40
41
}
str
std::string str(const T &t)
Definition:
UserAssistedSegmenterGuiWidgetController.cpp:42
armarx::exceptions::local::MissingRequiredPropertyException::MissingRequiredPropertyException
MissingRequiredPropertyException(std::string propertyName, Ice::PropertiesPtr const &properties)
Definition:
UnexpectedEnumValueException.cpp:27
UnexpectedEnumValueException.h
armarx::exceptions::local::UnexpectedEnumValueException::UnexpectedEnumValueException
UnexpectedEnumValueException(const std::string &enumName, int value)
Constructor.
Definition:
UnexpectedEnumValueException.cpp:10
IceInternal::Handle< ::Ice::Properties >
cxxopts::value
std::shared_ptr< Value > value()
Definition:
cxxopts.hpp:926
armarx::exceptions::local
Definition:
DynamicLibraryException.h:31
armarx::exceptions::local::UnexpectedEnumValueException::getEnumName
const std::string & getEnumName() const
Get the name of the enum type.
Definition:
UnexpectedEnumValueException.cpp:17
armarx::to_string
const std::string & to_string(const std::string &s)
Definition:
StringHelpers.h:40
MissingRequiredPropertyException.h
std
Definition:
Application.h:66
armarx::exceptions::local::MissingRequiredPropertyException::propertyName
std::string propertyName
Definition:
MissingRequiredPropertyException.h:51
armarx::exceptions::local::UnexpectedEnumValueException::getValue
int getValue() const
Get the encountered enum value.
Definition:
UnexpectedEnumValueException.cpp:22
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
ArmarXCore
core
exceptions
local
UnexpectedEnumValueException.cpp
Generated on Sat Oct 5 2024 09:13:54 for armarx_documentation by
1.8.17