~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/error.cc

  • Committer: Lee Bieber
  • Date: 2011-03-23 01:55:35 UTC
  • mfrom: (2245.1.2 build)
  • Revision ID: kalebral@gmail.com-20110323015535-2aatqy8tyiuqtc2z
Merge Olaf - more code refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <boost/unordered_map.hpp>
34
34
#include <exception>
35
35
 
36
 
namespace drizzled
37
 
{
38
 
namespace
39
 
{
 
36
namespace drizzled {
 
37
namespace {
40
38
 
41
39
class ErrorStringNotFound: public std::exception
42
40
{
43
 
public:
44
 
  ErrorStringNotFound()
45
 
  {}
46
41
};
47
42
 
48
43
ErrorMap& get_error_map()
71
66
  {
72
67
    return get_error_map().find(code).c_str();
73
68
  }
74
 
  catch (ErrorStringNotFound const& e)
 
69
  catch (ErrorStringNotFound const&)
75
70
  {
76
71
    return get_error_map().find(ER_UNKNOWN_ERROR).c_str();
77
72
  }