/*
* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  VPbkEngUtils error output class
*
*/


#ifndef VPBKENGUTILSERROR_H
#define VPBKENGUTILSERROR_H


// INCLUDES
#include <e32std.h>

namespace VPbkEngUtils {

    /**
     * Virtual Phonebook Engine Utils error codes and functions.
     *
     * NOTE: Use this panic category and error codes only for VPbEngUtil module's
     * errors.
     */
    namespace Error
        {
        /// Panic category for Virtual Phonebook Engine Utils
        _LIT(KPanicCategory, "VPbkEngUtils");

        /**
         * Panic codes for the Virtual Phonebook engine.
         */
        enum TPanicCode
            {
            /// Invalid index was used
            EPanicInvalidIndex = 1,
            /// Invalid value (out of range) was used
            EPanicInvalidValue,
            /// An overflow occured in a buffer or data structure
            EPanicOverflow,
            /// Invalid operation
            EPanicInvalidOperation
            };

        /**
         * Called if an unrecoverable error is detected.
         * Stops the calling thread with User::Panic(KPanicCategory, aPanicCode).
         */
        void Panic(TPanicCode aPanicCode);
        }

}  // namespace VPbkEngUtils

#endif  // VPBKENGUTILSERROR_H
//End of file


