File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -39,30 +39,30 @@ class NgxException final : public virtual std::exception,
39
39
throw NgxException (rc, msg);
40
40
}
41
41
42
- static void require (bool cond, ngx_int_t e = NGX_ERROR)
42
+ static void require (bool cond, ngx_int_t e = NGX_ERROR, string_ref_type msg = " " )
43
43
{
44
44
if (!cond)
45
45
{
46
- raise (e);
46
+ raise (e, msg );
47
47
}
48
48
}
49
49
50
- static void require (ngx_int_t rc, ngx_int_t x = NGX_OK)
50
+ static void require (ngx_int_t rc, ngx_int_t x = NGX_OK, string_ref_type msg = " " )
51
51
{
52
- require (rc == x, rc);
52
+ require (rc == x, rc, msg );
53
53
}
54
54
55
55
template <typename T>
56
- static void require (T* p, ngx_int_t e = NGX_ERROR)
56
+ static void require (T* p, ngx_int_t e = NGX_ERROR, string_ref_type msg = " " )
57
57
{
58
- require (p != nullptr , e);
58
+ require (p != nullptr , e, msg );
59
59
}
60
60
61
- static void fail (bool cond, ngx_int_t e = NGX_ERROR)
61
+ static void fail (bool cond, ngx_int_t e = NGX_ERROR, string_ref_type msg = " " )
62
62
{
63
63
if (cond)
64
64
{
65
- raise (e);
65
+ raise (e, msg );
66
66
}
67
67
}
68
68
You can’t perform that action at this time.
0 commit comments