~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/error.cc

  • Committer: Mark Atwood
  • Date: 2011-10-08 04:50:51 UTC
  • mfrom: (2430.1.1 rf)
  • Revision ID: me@mark.atwood.name-20111008045051-6ha1qiy7k2a9c3jv
Tags: 2011.10.27
mergeĀ lp:~olafvdspek/drizzle/refactor2

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::priority_t _verbosity= error::ERROR;
 
83
static error::level_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
 
    }
105
90
  case error::INSPECT:
106
91
    {
107
92
      static std::string _arg= "INSPECT";
118
103
      return _arg;
119
104
    }
120
105
  case error::ERROR:
121
 
    break;
 
106
    {
 
107
      static std::string _arg= "ERROR";
 
108
      return _arg;
 
109
    }
122
110
  }
123
111
 
124
 
  static std::string _arg= "ERROR";
125
 
  return _arg;
 
112
  abort();
126
113
}
127
114
 
128
 
error::priority_t &verbosity()
 
115
error::level_t &verbosity()
129
116
{
130
117
  return _verbosity;
131
118
}
144
131
  {
145
132
    _verbosity= error::WARN;
146
133
  }
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;
 
134
  else if (not arg.compare("ERROR"))
 
135
  {
 
136
    _verbosity= error::ERROR;
 
137
  }
161
138
}
162
139
 
163
140
} // namespace error
662
639
  ADD_ERROR_MESSAGE(ER_USE_DATA_DICTIONARY, N_("Engine status is now stored in the data_dictionary tables, please use these instead."));
663
640
  ADD_ERROR_MESSAGE(ER_TRANSACTION_ALREADY_STARTED, N_("There is already a transaction in progress"));
664
641
  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"));
668
642
}
669
643
 
670
644
} /* namespace drizzled */