summaryrefslogtreecommitdiff
path: root/server/src/versionstr.h
diff options
context:
space:
mode:
authordeva <deva>2009-07-24 09:13:28 +0000
committerdeva <deva>2009-07-24 09:13:28 +0000
commit74e8a4a4e07238d7aefab9dc038aeb9339a69515 (patch)
tree7503e05d9f215873f0317dd4636fde5f8c85d721 /server/src/versionstr.h
parentfa72729cdfdcbae8cd7f119d4aae505ce2910be2 (diff)
Added exception throwing info.
Diffstat (limited to 'server/src/versionstr.h')
-rw-r--r--server/src/versionstr.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/src/versionstr.h b/server/src/versionstr.h
index ceed42f..f54bf8d 100644
--- a/server/src/versionstr.h
+++ b/server/src/versionstr.h
@@ -30,6 +30,8 @@
#include <string>
+#include "exception.h"
+
// Workaround - major, minor and patch are defined as macros when using _GNU_SOURCES
#ifdef major
#undef major
@@ -50,9 +52,10 @@ class VersionStr {
public:
/**
* Constructor.
+ * Throws an exeption if the string does not parse.
* @param v A std::string containing a version string on the form a.b or a.b.c
*/
- VersionStr(std::string v);
+ VersionStr(std::string v) throw(Exception);
/**
* Constructor.
@@ -72,8 +75,9 @@ public:
/**
* Assignment from std::string operator.
* Same as in the VersionStr(std::string v) constructor.
+ * Throws an exeption if the string does not parse.
*/
- void operator=(std::string v);
+ void operator=(std::string v) throw(Exception);
/**
* Comparison operator.
@@ -98,7 +102,7 @@ public:
size_t patch() const;
private:
- void set(std::string v);
+ void set(std::string v) throw(Exception);
size_t version[3];
};