bintools/rcomp/src/ERRORHAN.CPP
changeset 0 044383f39525
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1 /*
       
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "ERRORHAN.H"
       
    20 #include "MEM.H"
       
    21 
       
    22 #if defined(__MSVCDOTNET__) || defined(__TOOLS2__)
       
    23 using std::cerr;
       
    24 using std::endl;
       
    25 #endif //__MSVCDOTNET__
       
    26 
       
    27 int ErrorHandler::iLineNumber = 0;
       
    28 const String* ErrorHandler::iFileName;
       
    29 
       
    30 void ErrorHandler::Register(const String* aFileNameToSet,int aLineNumberToSet)
       
    31 	{
       
    32 	iFileName=aFileNameToSet;
       
    33 	iLineNumber=aLineNumberToSet;
       
    34 	}
       
    35 
       
    36 void ErrorHandler::OutputErrorLine(const String& aAdditionalText)
       
    37 	{
       
    38 	cerr << *iFileName << "(" << iLineNumber << ") : " << aAdditionalText << endl;
       
    39 	}
       
    40 
       
    41 void ErrorHandler::OutputWholeLine(String aFileName, int aLineNumber, String aComment)
       
    42 	{
       
    43 	Register(&aFileName, aLineNumber);
       
    44 	OutputErrorLine(aComment);
       
    45 	}
       
    46