~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/error.cc

  • Committer: Mark Atwood
  • Date: 2011-12-16 15:35:52 UTC
  • mfrom: (2472.1.1 drizzle-build)
  • Revision ID: me@mark.atwood.name-20111216153552-0zk0mmf1tt22p92n
mergeĀ lp:~brianaker/drizzle/libdrizzle-valgrind-test-warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
  my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), user.getSQLPath().c_str(), table.getSQLPath().c_str());
81
81
82
82
 
83
 
static error::level_t _verbosity= error::ERROR;
 
83
static error::priority_t _verbosity= error::ERROR;
84
84
static std::string _verbosity_strint;
85
85
 
86
86
const std::string &verbose_string()
87
87
{
88
88
  switch (_verbosity)
89
89
  {
 
90
  case error::ALERT:
 
91
    {
 
92
      static std::string _arg= "ALERT";
 
93
      return _arg;
 
94
    }
 
95
  case error::EMERG:
 
96
    {
 
97
      static std::string _arg= "EMERG";
 
98
      return _arg;
 
99
    }
 
100
  case error::CRITICAL:
 
101
    {
 
102
      static std::string _arg= "CRITICAL";
 
103
      return _arg;
 
104
    }
90
105
  case error::INSPECT:
91
106
    {
92
107
      static std::string _arg= "INSPECT";
103
118
      return _arg;
104
119
    }
105
120
  case error::ERROR:
106
 
    {
107
 
      static std::string _arg= "ERROR";
108
 
      return _arg;
109
 
    }
 
121
    break;
110
122
  }
111
123
 
112
 
  abort();
 
124
  static std::string _arg= "ERROR";
 
125
  return _arg;
113
126
}
114
127
 
115
 
error::level_t &verbosity()
 
128
error::priority_t &verbosity()
116
129
{
117
130
  return _verbosity;
118
131
}
131
144
  {
132
145
    _verbosity= error::WARN;
133
146
  }
134
 
  else if (not arg.compare("ERROR"))
135
 
  {
136
 
    _verbosity= error::ERROR;
137
 
  }
 
147
  else if (not arg.compare("EMERG"))
 
148
  {
 
149
    _verbosity= error::EMERG;
 
150
  }
 
151
  else if (not arg.compare("CRITICAL"))
 
152
  {
 
153
    _verbosity= error::CRITICAL;
 
154
  }
 
155
  else if (not arg.compare("ALERT"))
 
156
  {
 
157
    _verbosity= error::ALERT;
 
158
  }
 
159
 
 
160
  _verbosity= error::ERROR;
138
161
}
139
162
 
140
163
} // namespace error
639
662
  ADD_ERROR_MESSAGE(ER_USE_DATA_DICTIONARY, N_("Engine status is now stored in the data_dictionary tables, please use these instead."));
640
663
  ADD_ERROR_MESSAGE(ER_TRANSACTION_ALREADY_STARTED, N_("There is already a transaction in progress"));
641
664
  ADD_ERROR_MESSAGE(ER_NO_LOCK_HELD, N_("No lock is held by this connection."));
 
665
  
 
666
  // Errors in scripts, such as JavaScript
 
667
  ADD_ERROR_MESSAGE(ER_SCRIPT, N_("Script error: %s"));
642
668
}
643
669
 
644
670
} /* namespace drizzled */