ErrorHandlingMacros.hpp
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:2k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. /* Copyright (C) 2003 MySQL AB
  2.    This program is free software; you can redistribute it and/or modify
  3.    it under the terms of the GNU General Public License as published by
  4.    the Free Software Foundation; either version 2 of the License, or
  5.    (at your option) any later version.
  6.    This program is distributed in the hope that it will be useful,
  7.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9.    GNU General Public License for more details.
  10.    You should have received a copy of the GNU General Public License
  11.    along with this program; if not, write to the Free Software
  12.    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
  13. #ifndef ERRORHANDLINGMACROS_H
  14. #define ERRORHANDLINGMACROS_H
  15. #include "ErrorReporter.hpp"
  16. #include "Error.hpp"
  17. extern const char programName[];
  18. #define ERROR_SET_SIGNAL(messageCategory, messageID, problemData, objectRef) 
  19.         ErrorReporter::handleError(messageCategory, messageID, problemData, objectRef, NST_ErrorHandlerSignal)
  20. #define ERROR_SET(messageCategory, messageID, problemData, objectRef) 
  21.         ErrorReporter::handleError(messageCategory, messageID, problemData, objectRef)
  22.         // Description:
  23.         //      Call ErrorHandler with the supplied arguments. The
  24.         //      ErrorHandler decides how to report the error.
  25.         // Parameters:
  26.         //      messageCategory IN      A hint to the error handler how the 
  27.         //                              error should be reported. Can be
  28.         //                              error, fatal (or warning, use WARNING_SET instead).
  29.         //      messageID       IN      Code identifying the error. If less
  30.         //                              than 1000 a unix error is assumed. If
  31.         //                              greater than 1000 the code is treated 
  32.         //                              as the specific problem code.
  33.         //      problemData     IN      A (short) text describing the error.
  34.         //                              The context information is added to
  35.         //                              this text.
  36.         //      objectRef       IN      The name of the "victim" of the error.
  37.         //                              Specify NULL if not applicable.
  38.         // Return value:
  39.         //      -
  40.         // Reported errors:
  41.         //      -
  42.         // Additional information:
  43.         //      -
  44. #endif