epoc32/include/pcstore/storeexception.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/pcstore/storeexception.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,83 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#if !defined(__STOREEXCEPTION_H__)
    1.20 +#define __STOREEXCEPTION_H__
    1.21 +
    1.22 +namespace PCStore
    1.23 +{
    1.24 +/**
    1.25 +@internalAll
    1.26 +
    1.27 +Class for the exceptions which will be thrown by the PCStore library.
    1.28 +*/
    1.29 +class TStoreException
    1.30 +	{
    1.31 +public:
    1.32 +	//Enumerations for the store open mode
    1.33 +	enum EStoreError
    1.34 +		{
    1.35 +		/**
    1.36 +		library wide error code -1: fail to open file.
    1.37 +		*/
    1.38 +		EFileOpenError = -1,
    1.39 +
    1.40 +		/**
    1.41 +		library wide error code -2: fail to read file.
    1.42 +		*/
    1.43 +		EFileReadError = -2,
    1.44 +
    1.45 +		/**
    1.46 +		library wide error code -3: fail to write file.
    1.47 +		*/
    1.48 +		EFileWriteError = -3,
    1.49 +
    1.50 +		/**
    1.51 +		library wide error code -4: fail to seek file.
    1.52 +		*/
    1.53 +		EFileSeekError = -4,
    1.54 +
    1.55 +		/**
    1.56 +		library wide error code -5: attemp to create stream while another stream exists.
    1.57 +		*/
    1.58 +		EStreamExclusionError = -5,
    1.59 +
    1.60 +		/**
    1.61 +		library wide error code -6: the file is not the supported store type.
    1.62 +		*/
    1.63 +		EStoreNotSupported = -6,
    1.64 +
    1.65 +		/**
    1.66 +		library wide error code -7: operation on a mismatching type of store.
    1.67 +		*/
    1.68 +		EStoreModeError = -7,
    1.69 +
    1.70 +		/**
    1.71 +		library wide error code -8: the store file is corrupted.
    1.72 +		*/
    1.73 +		EStoreCorrupt = -8,
    1.74 +
    1.75 +		/**
    1.76 +		library wide error code -9: the maximum length of the descriptor overfloates
    1.77 +		*/
    1.78 +		EDesOverfloat = -9
    1.79 +		};
    1.80 +	TStoreException(EStoreError aCode);
    1.81 +
    1.82 +public:
    1.83 +	EStoreError iErrorCode;
    1.84 +	};
    1.85 +}
    1.86 +#endif // !defined(__STOREEXCEPTION_H__)