summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-10-29 00:02:22 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-10-29 00:37:30 +0100
commit887eebf325c776218915f27fa3163f97971264a0 (patch)
tree1d1876176315ed7d0b4e24d9bd5015ae4e55a80a
parentUse optional helpers in adhocutil and dbpp (diff)
downloadgentoobrowse-api-887eebf325c776218915f27fa3163f97971264a0.tar.bz2
gentoobrowse-api-887eebf325c776218915f27fa3163f97971264a0.tar.xz
gentoobrowse-api-887eebf325c776218915f27fa3163f97971264a0.zip
Add ice_print to GitError
-rw-r--r--gentoobrowse-api/api/impl.cpp11
-rw-r--r--gentoobrowse-api/api/maintenance.ice1
2 files changed, 12 insertions, 0 deletions
diff --git a/gentoobrowse-api/api/impl.cpp b/gentoobrowse-api/api/impl.cpp
new file mode 100644
index 0000000..1da1dfc
--- /dev/null
+++ b/gentoobrowse-api/api/impl.cpp
@@ -0,0 +1,11 @@
+#include <maintenance.h>
+#include <buffer.h>
+
+namespace Gentoo {
+ void GitError::ice_print(std::ostream & s) const
+ {
+ s << stringbf("Git Error: %s (code %d, class %d)",
+ message, errorCode, errorClass);
+ }
+}
+
diff --git a/gentoobrowse-api/api/maintenance.ice b/gentoobrowse-api/api/maintenance.ice
index a66b1d0..013acb3 100644
--- a/gentoobrowse-api/api/maintenance.ice
+++ b/gentoobrowse-api/api/maintenance.ice
@@ -1,4 +1,5 @@
module Gentoo {
+ ["cpp:ice_print"]
exception GitError {
int errorCode;
int errorClass;