D.S

dev.mysql.com

MySQL: rapid/plugin/x/mysqlxtest_src/mysqlx_error.h Source File

MySQL: rapid/plugin/x/mysqlxtest_src/mysqlx_error.h Source File MySQL  8.0.0 Source Code Documentation Main Page Related Pages Modules Namespaces Classes Files File List File Members mysqlx_error.h Go to the documentation of this file. 1 /* 2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. 3  * 4  * This program is free software; you can redistribute it and/or 5  * modify it under the terms of the GNU General Public License as 6  * published by the Free Software Foundation; version 2 of the 7  * License. 8  * 9  * This program is distributed in the hope that it will be useful, 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of 11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12  * GNU General Public License for more details. 13  * 14  * You should have received a copy of the GNU General Public License 15  * along with this program; if not, write to the Free Software 16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 17  * 02110-1301 USA 18  */ 19  20 // MySQL DB access module, for use by plugins and others 21 // For the module that implements interactive DB functionality see mod_db 22  23 #ifndef _MYSQLX_ERROR_H_ 24 #define _MYSQLX_ERROR_H_ 25  26 #include <stdexcept> 27 #include <string> 28  29 #include <boost/config.hpp> 30  31 namespace mysqlx 32 { 33   class Error 34  { 35  public: 36   Error (int err = 0, const std::string &message = "") 37  : _message (message), _error ( err ) 38  { } 39  40   virtual ~Error () BOOST_NOEXCEPT_OR_NOTHROW 41  { } 42  43   int error () const { return _error ; } 44  45   operator bool () const 46  { 47  return 0 != _error ; 48  } 49  50   const char * what () const 51  { 52  return _message .c_str(); 53  } 54  55  private: 56   std::string _message ; 57   int _error ; 58  }; 59 } 60  61 #endif mysqlx::Error::~Error virtual ~Error() BOOST_NOEXCEPT_OR_NOTHROW Definition: mysqlx_error.h:40 mysqlx::Error::Error Error(int err=0, const std::string &message="") Definition: mysqlx_error.h:36 mysqlx::Error::what const char * what() const Definition: mysqlx_error.h:50 mysqlx::Error::_error int _error Definition: mysqlx_error.h:57 mysqlx::Error::_message std::string _message Definition: mysqlx_error.h:56 json_binary::err static Value err() Create a Value object that represents an error condition. Definition: json_binary.cc:976 mysqlx::Error Definition: mysqlx_error.h:33 mysqlx Definition: expr_parser.h:51 mysqlx::Error::error int error() const Definition: mysqlx_error.h:43 rapid plugin x mysqlxtest_src mysqlx_error.h Generated by 1.8.11