mmuifw_plat/alf_containerwidget_api/inc/alf/alfcontainerwidgetexception.h
branchRCL_3
changeset 26 0e9bb658ef58
parent 0 e83bab7cf002
equal deleted inserted replaced
25:4ea6f81c838a 26:0e9bb658ef58
       
     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:  Container widget exception class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ALFCONTAINERWIDGETEXCEPTION_H
       
    20 #define ALFCONTAINERWIDGETEXCEPTION_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <alf/alfexception.h>
       
    24 #include <osn/ustring.h>
       
    25 
       
    26 namespace Alf
       
    27     {
       
    28 
       
    29 /**
       
    30  * Error codes used with AlfContainerWidgetException.
       
    31  *
       
    32  * There is an offset in AlfContainerWidgetException error codes, so that
       
    33  * AlfContainerWidget specific exceptions can be separated from
       
    34  * osncore::AlfException base exceptions and exceptions of other widgets.
       
    35  */
       
    36 enum TAlfContainerWidgetErrorCode
       
    37     {
       
    38     /**
       
    39      * Error occured in construction or initialization of the container
       
    40      * widget.
       
    41      */
       
    42     EInitializationError = 500
       
    43     };
       
    44 
       
    45 /**
       
    46  * AlfContainerWidgetException is a base class for all container widget
       
    47  * exceptions.
       
    48  *
       
    49  */
       
    50 class AlfContainerWidgetException : public osncore::AlfException
       
    51     {
       
    52 public:
       
    53     // Constructors and destructor
       
    54 
       
    55     /**
       
    56      * Constructor with AlfContainerWidget specific error code.
       
    57      *
       
    58      * Error code has to be one of the error codes specified in
       
    59      * Alf::TAlfContainerWidgetErrorCode or a system-wide error code
       
    60      * represented by negative integer.
       
    61      *
       
    62      * @see osncore::AlfException::errorCode()
       
    63      *
       
    64      * @param aError Error code to describe the occured exception.
       
    65      */
       
    66     AlfContainerWidgetException(int aError) throw();
       
    67 
       
    68     /**
       
    69      * Constructor with AlfContainerWidget specific error code
       
    70      * and additional information.
       
    71      *
       
    72      * Error code has to be one of the error codes specified in
       
    73      * Alf::TAlfContainerWidgetErrorCode or a system-wide error code
       
    74      * represented by negative integer.
       
    75      *
       
    76      * @see osncore::AlfException::errorCode()
       
    77      *
       
    78      * @param aError Error code to describe the occured exception.
       
    79      * @param aInfo Optional additional information or NULL.
       
    80         */
       
    81     AlfContainerWidgetException(int aError, const char* aInfo) throw();
       
    82 
       
    83     /**
       
    84      * Constructor with AlfContainerWidget specific error code,
       
    85      * additional information, source file and line of code.
       
    86      *
       
    87      * Error code has to be one of the error codes specified in
       
    88      * Alf::TAlfContainerWidgetErrorCode or a system-wide error code
       
    89      * represented by negative integer.
       
    90      *
       
    91      * @see osncore::AlfException::errorCode()
       
    92      *
       
    93      * @param aError Error code to describe the occured exception.
       
    94      * @param aInfo Optional additional information or NULL.
       
    95         * @param aFileAndLine Optional file and line information or NULL.
       
    96         */
       
    97     AlfContainerWidgetException(int aError, const char* aInfo, const char* aFileAndLine) throw();
       
    98 
       
    99     /**
       
   100      * Default destructor.
       
   101      */
       
   102     virtual ~AlfContainerWidgetException() throw();
       
   103 
       
   104     /**
       
   105      * Returns the description of the exception.
       
   106      * @ret The description of the exception.
       
   107      */
       
   108     const char* what() const throw();
       
   109 
       
   110 private:
       
   111 
       
   112     /**
       
   113      * Error description
       
   114      */
       
   115     osncore::UString mDescription;
       
   116 
       
   117     };
       
   118 
       
   119     } // Namespace Alf
       
   120 
       
   121 #endif // ALFCONTAINERWIDGETEXCEPTION_H