summaryrefslogtreecommitdiff
path: root/src/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.h')
-rw-r--r--src/error.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/error.h b/src/error.h
index 09cfbb9..8b26471 100644
--- a/src/error.h
+++ b/src/error.h
@@ -30,6 +30,15 @@
#include <string>
using namespace std;
+/**
+ * This struct contains one error, and a pointer to the previous one.
+ */
+typedef struct __err_entry {
+ string errstr;
+ struct __err_entry *prev;
+} _err_entry;
+
+
class Error {
public:
Error();
@@ -37,17 +46,17 @@ public:
// Status methods
bool hasError();
- string getErrorString();
+ string popErrorString();
// Set methods
- void setError(char* errstr);
- void setError(string &errstr);
- void removeError();
+ void pushError(char* errstr);
+ void pushError(string &errstr);
+ void removeAllErrors();
private:
// Used to save the state of the network and camera connections.
bool error;
- string lastError;
+ _err_entry *lastError;
};
#endif/*__MIAV_ERROR_H__*/