~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/errmsg_print.h

  • Committer: patrick crews
  • Date: 2011-06-08 03:02:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2329.
  • Revision ID: gleebix@gmail.com-20110608030227-updkyv2652zvfajc
Initial voodoo worked to give us a crashme mode.  Need docs still

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
 
#ifndef DRIZZLED_ERRMSG_PRINT_H
26
 
#define DRIZZLED_ERRMSG_PRINT_H
 
25
 
 
26
 
 
27
#pragma once
 
28
 
 
29
#include <drizzled/visibility.h>
 
30
#include <drizzled/error/level_t.h>
 
31
 
 
32
#include <string>
27
33
 
28
34
namespace drizzled
29
35
{
30
36
 
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, ...)
 
37
DRIZZLED_API bool errmsg_printf(error::level_t priority, char const *format, ...)
37
38
  __attribute__((format(printf, 2, 3)));
38
39
 
39
 
void sql_perror(const char *message);
 
40
DRIZZLED_API void sql_perror(const char *message);
 
41
DRIZZLED_API void sql_perror(const std::string &message);
 
42
DRIZZLED_API void sql_perror(std::string message, const std::string &extra);
40
43
 
41
44
} /* namespace drizzled */
42
45
 
43
 
#endif /* DRIZZLED_ERRMSG_PRINT_H */
44
46
 
45
47