alfwidgetutils/src/alfattributeexception.cpp
changeset 17 3eca7e70b1b8
parent 3 4526337fb576
equal deleted inserted replaced
3:4526337fb576 17:3eca7e70b1b8
     1 /*
       
     2 * Copyright (c) 2007 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 "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:  The implementation for attribute exception class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <alf/alfattributeexception.h>
       
    21 #include "alfexceptionstrings.h"
       
    22 
       
    23 using namespace osncore;
       
    24 
       
    25 
       
    26 
       
    27 // ======== MEMBER FUNCTIONS ========
       
    28 
       
    29 // ---------------------------------------------------------------------------
       
    30 // Constructor
       
    31 // ---------------------------------------------------------------------------
       
    32 //
       
    33 OSN_EXPORT AlfAttributeException::AlfAttributeException( int aErrorCode ) throw() :
       
    34         AlfException( aErrorCode )
       
    35     {
       
    36     }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // Constructor
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 OSN_EXPORT AlfAttributeException::AlfAttributeException(
       
    43     int aErrorCode, const char* aInfo, const char* aFileAndLine ) throw() :
       
    44         AlfException( aErrorCode, aInfo, aFileAndLine )
       
    45     {
       
    46     }
       
    47 
       
    48 // ---------------------------------------------------------------------------
       
    49 // Destructor
       
    50 // ---------------------------------------------------------------------------
       
    51 //
       
    52 OSN_EXPORT AlfAttributeException::~AlfAttributeException() throw()
       
    53     {
       
    54 // nothing to do!
       
    55     }
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 // Returns the error information in c-string style.
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 OSN_EXPORT const char* AlfAttributeException::what() const throw()
       
    62     {
       
    63     switch ( errorCode() )
       
    64         {
       
    65         case EInvalidAttribute:
       
    66             return KErrorInvalidAttribute;
       
    67         case EInvalidAttributeValue:
       
    68             return KErrorInvalidAttributeValue;
       
    69         case EIncompleteAttributeValues:
       
    70             return KErrorIncompleteAttributeValues;
       
    71         default:
       
    72             return KErrorUndefinedException;
       
    73         }
       
    74     }
       
    75 
       
    76 // End of File