error.ha (443B)
1 // SPDX-License-Identifier: MPL-2.0 2 // (c) Hare authors <https://harelang.org> 3 4 // Invalid key. 5 export type invalidkey = !void; 6 7 // Invalid signature. 8 export type invalidsig = !void; 9 10 // Possible ecdsa errors. 11 export type error = !(invalidkey | invalidsig); 12 13 // String representation of error 'e'. 14 export fn strerror(e: error) str = { 15 match (e) { 16 case invalidkey => 17 return "Invalid key"; 18 case invalidsig => 19 return "Invalid sig"; 20 }; 21 };