2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Updates applications and icons in Operator Tile.
19 #ifndef __HSEXCEPTION_H__
20 #define __HSEXCEPTION_H__
27 * Class used to encapsulate error information thrown in exceptions by the
28 * Homescreen Publishing Api.
31 * ObserverClass* dataObserver = new ObserverClass();
34 * HsWidgetPublisher* hsPublisher = new HsWidgetPublisher( dataObserver );
37 * HsWidget& widget = hsPublisher->createHsWidget(
38 * "templateName", "widgetName", "uniqueIdentifier" );
39 * //attempt to create the widget again (with the same information)
40 * //will cause an exception
41 * hsPublisher->createHsWidget(
42 * "templateName", "widgetName", "uniqueIdentifier" );
45 * catch (HsException& exception)
47 * int errReason = exception.getReason();
48 * //if the exception is thrown, becasue the widget attempted to
49 * //be created already exists the errReason will be KErrAlreadyExists
53 class HsException : public std::exception
58 * Constructor of the HsException.
60 IMPORT_C HsException( int aLeaveCode );
63 * Destructor of the HsException.
65 IMPORT_C virtual ~HsException();
68 * Method retrieves the error information contained in the
72 * ObserverClass* dataObserver = new ObserverClass();
75 * HsWidgetPublisher* hsPublisher = new HsWidgetPublisher(dataObserver);
76 * hsPublisher->createHsWidget(
77 * "templateName", "widgetName", "uniqueIdentifier" );
79 * catch (HsException& exception)
81 * int errReason = exception.getReason();
86 IMPORT_C int getReason();
95 #endif /*__HSEXCEPTION_H__*/