StrError
Description
Get last error using an error number.
Parameters
| Name | Direction | Description |
|---|---|---|
eno |
in | Unique error number descriptor. |
err_str |
out | Error string will be stored in this. |
Success
Error string describing last error.
Failure
Returns NULL if err_str is NULL.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Sys.c:69:
}
Str *StrError(i32 eno, Str *err_str) {
ValidateStr(err_str);
Allocator *alloc = err_str->allocator;- In
Log.c:49:
Str syserr;
StrInitStack(syserr, &err_alloc, SYS_ERROR_STR_MAX_LENGTH, {
StrError(errno, &syserr);
LOG_ERROR("Failed to get localtime : {}", syserr);
});- In
Log.h:89:
Str syserr_; \
StrInitStack(syserr_, &log_alloc_, 256, { \
StrError(errno, &syserr_); \
StrWriteFmt(&m_, " : {}", syserr_); \
}); \
- In
Log.h:108:
Str syserr_; \
StrInitStack(syserr_, &log_alloc_, 256, { \
StrError(errno, &syserr_); \
StrWriteFmt(&m_, " : {}", syserr_); \
}); \
- In
Log.h:126:
Str syserr_; \
StrInitStack(syserr_, &log_alloc_, 256, { \
StrError(errno, &syserr_); \
StrWriteFmt(&m_, " : {}", syserr_); \
}); \
Last updated on