1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
4
* Copyright (C) 2008 Mark Atwood
6
6
* This program is free software; you can redistribute it and/or modify
7
7
* it under the terms of the GNU General Public License as published by
27
25
#ifndef DRIZZLED_ERRMSG_PRINT_H
28
26
#define DRIZZLED_ERRMSG_PRINT_H
30
#include "drizzled/visibility.h"
31
#include <drizzled/error/level_t.h>
38
DRIZZLED_API bool errmsg_printf(error::level_t priority, char const *format, ...)
39
__attribute__((format(printf, 2, 3)));
41
void sql_perror(const char *message);
42
void sql_perror(const std::string &message);
43
void sql_perror(std::string message, const std::string &extra);
45
} /* namespace drizzled */
28
//void sql_print_error (const char *format, ...);
29
//void sql_print_warning (const char *format, ...);
30
//void sql_print_information (const char *format, ...);
31
//void sql_perror (const char *message);
33
#define ERRMSG_LVL_DBUG 1
34
#define ERRMSG_LVL_INFO 2
35
#define ERRMSG_LVL_WARN 3
36
#define ERRMSG_LVL_ERROR 4
38
// todo: add __attribute__((format(printf, 1, 2)))
39
bool errmsg_printf (int priority, char const *format, ...);
41
void sql_perror (const char *message);
47
43
#endif /* DRIZZLED_ERRMSG_PRINT_H */