diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-10-29 00:02:22 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-10-29 00:37:30 +0100 |
commit | a5fb1375e2bff5652da2e239d5ca017df42b70f2 (patch) | |
tree | 1d1876176315ed7d0b4e24d9bd5015ae4e55a80a | |
parent | Use optional helpers in adhocutil and dbpp (diff) | |
download | gentoobrowse-api-a5fb1375e2bff5652da2e239d5ca017df42b70f2.tar.bz2 gentoobrowse-api-a5fb1375e2bff5652da2e239d5ca017df42b70f2.tar.xz gentoobrowse-api-a5fb1375e2bff5652da2e239d5ca017df42b70f2.zip |
Add ice_print to GitError
-rw-r--r-- | gentoobrowse-api/api/impl.cpp | 11 | ||||
-rw-r--r-- | gentoobrowse-api/api/maintenance.ice | 1 |
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; |