From 87d64524c8e4397515be045901427e71b660134f Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 10 Sep 2019 20:55:24 +0200 Subject: Add basic crypto-vala --- plugins/crypto-vala/src/error.vala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/crypto-vala/src/error.vala (limited to 'plugins/crypto-vala/src/error.vala') 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 -- cgit v1.2.3-70-g09d2