mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
nix_api_util: throw nix::error instead of new nix::Error for null ctx's
This commit is contained in:
parent
e74d6c1b3d
commit
f0afe7f9b9
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ nix_err nix_context_error(nix_c_context *context) {
|
|||
nix_err nix_set_err_msg(nix_c_context *context, nix_err err, const char *msg) {
|
||||
if (context == nullptr) {
|
||||
// todo last_err_code
|
||||
throw new nix::Error("Nix C api error", msg);
|
||||
throw nix::Error("Nix C api error: %s", msg);
|
||||
}
|
||||
context->last_err_code = err;
|
||||
context->last_err = msg;
|
||||
|
|
Loading…
Reference in a new issue