Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
5e0ae4f4
Commit
5e0ae4f4
authored
Feb 21, 2019
by
Simon Spannagel
Browse files
Clipboard exceptions: InvalidData
parent
0dae1cbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/core/clipboard/Clipboard.hpp
View file @
5e0ae4f4
...
...
@@ -75,7 +75,7 @@ namespace corryvreckan {
* @brief Retrieve variable from the persistent clipboard storage
* @param name Name of the variable
* @return Stored value from the persistent clipboard storage
* @throws Missing
Key
Error in case the key is not found.
* @throws Missing
Data
Error in case the key is not found.
*/
double
get_persistent
(
std
::
string
name
);
...
...
src/core/clipboard/exceptions.h
View file @
5e0ae4f4
...
...
@@ -30,15 +30,26 @@ namespace corryvreckan {
class
MissingDataError
:
public
ClipboardError
{
public:
/**
* @brief Construct an error for a missing key
* @param key Name of the missing key
* @param section Section where the key should have been defined
* @brief Construct an error for a missing data item
* @param name Name of the missing item
*/
MissingDataError
(
const
std
::
string
&
name
)
{
error_message_
=
"No data with key '"
+
name
+
"' exists on the clipboard"
;
}
};
/**
* @ingroup Exceptions
* @brief Informs of invalid data
*/
class
InvalidDataError
:
public
ClipboardError
{
public:
/**
* @brief Construct an error for invalid data element
* @param reason Reason why the data is invalid
*/
InvalidDataError
(
const
std
::
string
&
reason
)
{
error_message_
=
"Data invalid: "
+
reason
;
}
};
}
// namespace corryvreckan
#endif
/* CORRYVRECKAN_CONFIG_EXCEPTIONS_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment