acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
c_errno.h
1// From acme/platform/error.h by camilo on 2023-07-06 08:41 <3ThomasBorregaardSorense!!
2#pragma once
3
4
5CLASS_DECL_ACME ::e_status get_last_status();
6CLASS_DECL_ACME void set_last_status(const ::e_status & estatus);
7
8
9struct c_errno_t {};
10
11
13class CLASS_DECL_ACME c_errno
14{
15public:
16
17
18 ::i32 m_iErrNo;
19
20
21 c_errno();
22#ifdef WINDOWS
23 c_errno(c_errno_t, errno_t iErrNo);
24#else
25 c_errno(c_errno_t, ::i32 iErrNo);
26#endif
27 c_errno(const c_errno & cerrno);
28
29
30 ::i32 as_i32() const {return m_iErrNo;}
31
32
33 ::string get_error_description() const;
34
35 ::string name() const;
36
37
38 class ::error_code error_code() const;
39
40 ::e_status estatus() const;
41
42 ::e_status failed_estatus() const;
43
44
45 ::e_status set_last_errno_status();
46
47 static c_errno s_errno();
48
49 static string s_get_error_description(c_errno cerrno = s_errno());
50
51 static void s_throw_exception(c_errno cerrno);
52
53
54 bool operator == (::i32 iErrNo) const {return m_iErrNo == iErrNo; }
55
56
57};
58
59
Definition e_status.h:30
Definition c_errno.h:9