aboutsummaryrefslogtreecommitdiff
path: root/crypto-vala/src/error.vala
blob: 5007d72543c7f79fed35aea60fd19de8e3716d48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
namespace Crypto {

public errordomain Error {
    ILLEGAL_ARGUMENTS,
    GCRYPT,
    AUTHENTICATION_FAILED,
    UNKNOWN
}

internal void may_throw_gcrypt_error(GCrypt.Error e) throws Error {
    if (((int)e) != 0) {
        throw new Crypto.Error.GCRYPT(e.to_string());
    }
}
}