1
/* Copyright (C) 2000-2005 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
21
Read language depeneded messagefile
24
#include <drizzled/server_includes.h>
25
#include <mysys/mysys_err.h>
26
#include <drizzled/drizzled_error_messages.h>
28
static void init_myfunc_errs(void);
33
Read messages from errorfile.
35
This function can be called multiple times to reload the messages.
36
If it fails to load the messages, it will fail softly by initializing
37
the errmesg pointer to an array of empty strings or by keeping the
38
old array if it exists.
46
bool init_errmessage(void)
49
/* Register messages for use with my_error(). */
50
if (my_error_register(drizzled_error_messages,
51
ER_ERROR_FIRST, ER_ERROR_LAST))
56
init_myfunc_errs(); /* Init myfunc messages */
62
Initiates error-messages used by my_func-library.
65
static void init_myfunc_errs()
67
init_glob_errs(); /* Initiate english errors */
70
EE(EE_FILENOTFOUND) = ER(ER_FILE_NOT_FOUND);
71
EE(EE_CANTCREATEFILE) = ER(ER_CANT_CREATE_FILE);
72
EE(EE_READ) = ER(ER_ERROR_ON_READ);
73
EE(EE_WRITE) = ER(ER_ERROR_ON_WRITE);
74
EE(EE_BADCLOSE) = ER(ER_ERROR_ON_CLOSE);
75
EE(EE_OUTOFMEMORY) = ER(ER_OUTOFMEMORY);
76
EE(EE_DELETE) = ER(ER_CANT_DELETE_FILE);
77
EE(EE_LINK) = ER(ER_ERROR_ON_RENAME);
78
EE(EE_EOFERR) = ER(ER_UNEXPECTED_EOF);
79
EE(EE_CANTLOCK) = ER(ER_CANT_LOCK);
80
EE(EE_DIR) = ER(ER_CANT_READ_DIR);
81
EE(EE_STAT) = ER(ER_CANT_GET_STAT);
82
EE(EE_GETWD) = ER(ER_CANT_GET_WD);
83
EE(EE_SETWD) = ER(ER_CANT_SET_WD);
84
EE(EE_DISK_FULL) = ER(ER_DISK_FULL);