Hs::HsException Class Reference
Class used to encapsulate error information thrown in exceptions by the Homescreen Publishing Api.
ObserverClass* dataObserver = new ObserverClass();
try
{
HsWidgetPublisher* hsPublisher = new HsWidgetPublisher( dataObserver );
if ( hsPublisher )
{
HsWidget& widget = hsPublisher->createHsWidget(
"templateName", "widgetName", "uniqueIdentifier" );
//attempt to create the widget again (with the same information)
//will cause an exception
hsPublisher->createHsWidget(
"templateName", "widgetName", "uniqueIdentifier" );
}
}
catch (HsException& exception)
{
int errReason = exception.getReason();
//if the exception is thrown, becasue the widget attempted to
//be created already exists the errReason will be KErrAlreadyExists
}
Constructor & Destructor Documentation
HsException(int)
IMPORT_C
|
HsException
|
(
|
int
|
aLeaveCode
|
)
|
|
~HsException()
IMPORT_C
|
~HsException
|
(
|
)
|
[virtual]
|
Member Functions Documentation
getReason()
IMPORT_C int
|
getReason
|
(
|
)
|
|
Method retrieves the error information contained in the excpetion object.
ObserverClass* dataObserver = new ObserverClass();
try
{
HsWidgetPublisher* hsPublisher = new HsWidgetPublisher(dataObserver);
hsPublisher->createHsWidget(
"templateName", "widgetName", "uniqueIdentifier" );
}
catch (HsException& exception)
{
int errReason = exception.getReason();
}
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.