extern int mc_get_debug(void);
extern void mc_set_syslog(int syslog);
+
+/**
+ * @deprecated Use mc_error(), and return an appropriate error.
+ */
extern void mc_abort(const char *msg, ...);
extern void mc_debug(const char *msg, ...);
extern void mc_error(const char *msg, ...);
#endif
+/**
+ * @deprecated Use MC_ERROR(), and return an appropriate error.
+ */
#define MC_ABORT(x, ...) mc_abort(x, ##__VA_ARGS__)
#define MC_ERROR(x, ...) mc_error(x, ##__VA_ARGS__)
int fd, ret;
if((fd = open(filename, O_RDONLY)) < 0) {
- MC_ERROR("json_object_from_file: error reading file %s: %s\n",
+ MC_ERROR("json_object_from_file: error opening file %s: %s\n",
filename, strerror(errno));
return NULL;
}
}
close(fd);
if(ret < 0) {
- MC_ABORT("json_object_from_file: error reading file %s: %s\n",
+ MC_ERROR("json_object_from_file: error reading file %s: %s\n",
filename, strerror(errno));
printbuf_free(pb);
return NULL;