~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/errmsg_print.h

  • Committer: Lee Bieber
  • Date: 2011-03-13 16:37:38 UTC
  • mfrom: (2227.4.18 session2)
  • Revision ID: kalebral@gmail.com-20110313163738-7ti21zk40o2xi3ew
Merge Olaf - Refactor Session

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
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
22
22
   errmsg_printf()
23
23
*/
24
24
 
 
25
 
 
26
 
25
27
#ifndef DRIZZLED_ERRMSG_PRINT_H
26
28
#define DRIZZLED_ERRMSG_PRINT_H
27
29
 
 
30
#include <drizzled/visibility.h>
 
31
#include <drizzled/error/level_t.h>
 
32
 
 
33
#include <string>
 
34
 
28
35
namespace drizzled
29
36
{
30
37
 
31
 
#define ERRMSG_LVL_DBUG 1
32
 
#define ERRMSG_LVL_INFO 2
33
 
#define ERRMSG_LVL_WARN 3
34
 
#define ERRMSG_LVL_ERROR 4
35
 
 
36
 
bool errmsg_printf(int priority, char const *format, ...)
 
38
DRIZZLED_API bool errmsg_printf(error::level_t priority, char const *format, ...)
37
39
  __attribute__((format(printf, 2, 3)));
38
40
 
39
 
void sql_perror(const char *message);
 
41
DRIZZLED_API void sql_perror(const char *message);
 
42
DRIZZLED_API void sql_perror(const std::string &message);
 
43
DRIZZLED_API void sql_perror(std::string message, const std::string &extra);
40
44
 
41
45
} /* namespace drizzled */
42
46