DumontEXE 0.0.1
cmcError.cpp
00001 /* ***************************************************************************
00002 **
00003 ** Copyright (C) 2007 Lorimark Solutions, LLC. All rights reserved.
00004 **
00005 ** This file is part of the DumontEXE Scripting Extension Kit
00006 **
00007 ** This file may be used under the terms of the GNU General Public
00008 ** License version 2.0 as published by the Free Software Foundation
00009 ** and appearing in the file LICENSE.GPL included in the packaging of
00010 ** this file.  Please review the following information to ensure GNU
00011 ** General Public Licensing requirements will be met:
00012 ** http://dumont.showoff-db.org/opensource.html
00013 **
00014 ** If you are unsure which license is appropriate for your use, please
00015 ** review the following information:
00016 ** http://dumont.showoff-db.org/licensing.html 
00017 ** or contact the sales department at sales@lorimarksolutions.com.
00018 **
00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021 **
00022 ** author: Mark Petryk ~ Lorimark Solutions, LLC
00023 ** **************************************************************************/
00024 
00025 #include "cmcError.h"
00026 
00027 /*
00028 ** This should be provided by the main window manager
00029 **
00030 */
00031 void statusBar( const QString & message );
00032 
00033 
00034 namespace cmcDatabaseApi {
00035 
00036 cmcError::cmcError( const cmcError & copy )
00037 {
00038 //  m_number      = copy.number();
00039 //  m_description = copy.description();
00040 }
00041 
00042 cmcError::cmcError( QObject * parent )
00043 : QObject(parent)
00044 {
00045   clear();
00046 }
00047 
00048 cmcError::~cmcError()
00049 {
00050 }
00051 
00052 void cmcError::clear()
00053 {
00054   set( 0, "" );
00055 }
00056 
00057 void cmcError::set( const long _number, const QString & _description )
00058 {
00059   m_number      = _number;
00060   m_description = _description;
00061 }
00062 
00063 void cmcError::set
00064 (
00065   const char * file,
00066   long line,
00067   const char * funcInfo,
00068   const char * objectName,
00069   const long number,
00070   const QString & description
00071 )
00072 {
00073   set
00074   (
00075     number,
00076     QString("error: %1:%2:%3(\"%4\"):%5")
00077     .arg(file)
00078     .arg(line)
00079     .arg(funcInfo)
00080     .arg(objectName)
00081     .arg(description)
00082   );
00083 }
00084 
00085 
00086 long cmcError::number()
00087 {
00088   return( m_number );
00089 }
00090 
00091 QString cmcError::description()
00092 {
00093   return( m_description );
00094 }
00095 
00096 QString cmcError::message()
00097 {
00098   return( QString("%1: %2").arg(number()).arg(description()) );
00099 }
00100 
00101 } // endnamespace cmcDatabaseApi
00102 
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com