williamr@4: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // williamr@4: williamr@4: #if !defined(__STOREEXCEPTION_H__) williamr@4: #define __STOREEXCEPTION_H__ williamr@4: williamr@4: namespace PCStore williamr@4: { williamr@4: /** williamr@4: @internalAll williamr@4: williamr@4: Class for the exceptions which will be thrown by the PCStore library. williamr@4: */ williamr@4: class TStoreException williamr@4: { williamr@4: public: williamr@4: //Enumerations for the store open mode williamr@4: enum EStoreError williamr@4: { williamr@4: /** williamr@4: library wide error code -1: fail to open file. williamr@4: */ williamr@4: EFileOpenError = -1, williamr@4: williamr@4: /** williamr@4: library wide error code -2: fail to read file. williamr@4: */ williamr@4: EFileReadError = -2, williamr@4: williamr@4: /** williamr@4: library wide error code -3: fail to write file. williamr@4: */ williamr@4: EFileWriteError = -3, williamr@4: williamr@4: /** williamr@4: library wide error code -4: fail to seek file. williamr@4: */ williamr@4: EFileSeekError = -4, williamr@4: williamr@4: /** williamr@4: library wide error code -5: attemp to create stream while another stream exists. williamr@4: */ williamr@4: EStreamExclusionError = -5, williamr@4: williamr@4: /** williamr@4: library wide error code -6: the file is not the supported store type. williamr@4: */ williamr@4: EStoreNotSupported = -6, williamr@4: williamr@4: /** williamr@4: library wide error code -7: operation on a mismatching type of store. williamr@4: */ williamr@4: EStoreModeError = -7, williamr@4: williamr@4: /** williamr@4: library wide error code -8: the store file is corrupted. williamr@4: */ williamr@4: EStoreCorrupt = -8, williamr@4: williamr@4: /** williamr@4: library wide error code -9: the maximum length of the descriptor overfloates williamr@4: */ williamr@4: EDesOverfloat = -9 williamr@4: }; williamr@4: TStoreException(EStoreError aCode); williamr@4: williamr@4: public: williamr@4: EStoreError iErrorCode; williamr@4: }; williamr@4: } williamr@4: #endif // !defined(__STOREEXCEPTION_H__)