aboutsummaryrefslogtreecommitdiff
path: root/plugins/crypto-vala/src/error.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-09-10 20:55:24 +0200
committerMarvin W <git@larma.de>2019-09-16 23:31:11 +0200
commit87d64524c8e4397515be045901427e71b660134f (patch)
tree491a80731746c5b85d889901b4e37469feeb952d /plugins/crypto-vala/src/error.vala
parent784319a9c162896dbaaf3beb4a9f8ba777b149ff (diff)
downloaddino-87d64524c8e4397515be045901427e71b660134f.tar.gz
dino-87d64524c8e4397515be045901427e71b660134f.zip
Add basic crypto-vala
Diffstat (limited to 'plugins/crypto-vala/src/error.vala')
-rw-r--r--plugins/crypto-vala/src/error.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/crypto-vala/src/error.vala b/plugins/crypto-vala/src/error.vala
new file mode 100644
index 00000000..c694dfc7
--- /dev/null
+++ b/plugins/crypto-vala/src/error.vala
@@ -0,0 +1,13 @@
+namespace Crypto {
+
+public errordomain Error {
+ ILLEGAL_ARGUMENTS,
+ GCRYPT
+}
+
+internal void may_throw_gcrypt_error(GCrypt.Error e) throws GLib.Error {
+ if (((int)e) != 0) {
+ throw new Crypto.Error.GCRYPT(e.to_string());
+ }
+}
+} \ No newline at end of file