squareball
0.2.0.53-dd5b
A general-purpose library for C99
|
String error object. More...
Go to the source code of this file.
Functions | |
sb_error_t * | sb_strerror_new (const char *msg) |
sb_error_t * | sb_strerror_new_printf (const char *format,...) |
String error object.
This is an implementation of sb_error_t object, that only contains a string representing the error. Most of the internal squareball
errors are reported using this error type.
It is based on Golang's errorString
type, as implemented in the errors
package: https://golang.org/pkg/errors/
Users wanting to include custom/non-string data in the error objects should implement a custom error type, as described in squareball/sb-error.h documentation.
sb_error_t* sb_strerror_new | ( | const char * | msg | ) |
Function that creates a new string error object.
msg | Human-readable error message. |
sb_error_t* sb_strerror_new_printf | ( | const char * | format, |
... | |||
) |
Function that creates a new string error object, with printf(3)-like message formatting.
format | Format for human-readable error message. |
... | One or more printf(3)-like parameters. |