aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/blockchain_db.h')
-rw-r--r--src/cryptonote_core/blockchain_db.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain_db.h b/src/cryptonote_core/blockchain_db.h
index b3c73a0d8..f59678869 100644
--- a/src/cryptonote_core/blockchain_db.h
+++ b/src/cryptonote_core/blockchain_db.h
@@ -126,6 +126,8 @@
* TX_DNE
* TX_EXISTS
* OUTPUT_DNE
+ * OUTPUT_EXISTS
+ * KEY_IMAGE_EXISTS
*/
namespace cryptonote
@@ -302,7 +304,7 @@ class OUTPUT_DNE : public std::exception
private:
std::string m;
public:
- OUTPUT_DNE() : m("The transaction requested does not exist") { }
+ OUTPUT_DNE() : m("The output requested does not exist!") { }
OUTPUT_DNE(const char* s) : m(s) { }
virtual ~OUTPUT_DNE() { }
@@ -313,6 +315,38 @@ class OUTPUT_DNE : public std::exception
}
};
+class OUTPUT_EXISTS : public std::exception
+{
+ private:
+ std::string m;
+ public:
+ OUTPUT_EXISTS() : m("The output to be added already exists!") { }
+ OUTPUT_EXISTS(const char* s) : m(s) { }
+
+ virtual ~OUTPUT_EXISTS() { }
+
+ const char* what() const throw()
+ {
+ return m.c_str();
+ }
+};
+
+class KEY_IMAGE_EXISTS : public std::exception
+{
+ private:
+ std::string m;
+ public:
+ KEY_IMAGE_EXISTS() : m("The spent key image to be added already exists!") { }
+ KEY_IMAGE_EXISTS(const char* s) : m(s) { }
+
+ virtual ~KEY_IMAGE_EXISTS() { }
+
+ const char* what() const throw()
+ {
+ return m.c_str();
+ }
+};
+
/***********************************
* End of Exception Definitions
***********************************/