Skip to content

DBCError

parfeon edited this page Feb 7, 2012 · 2 revisions

Path to the file, which was the reason of the error. #DBCError Class Reference
[SQLitews]:http://www.sqlite.org
[DBCDatabaseCR]:https://github.com/parfeon/DBConnect/wiki/DBCDatabase
[DBCDatabaseBasicExample]:https://github.com/parfeon/DBConnect/wiki/DBCDatabase#basicExample
[DBCDatabaseExecuteQuery]:https://github.com/parfeon/DBConnect/wiki/DBCDatabase#m12
Overview
This class wraps error codes and provides some additional information about code itself and information from [SQLite][SQLitews] or [DBCDatabase][DBCDatabaseCR].

##Tasks
###DBCError initialization
+ errorWithErrorCode:
+ errorWithErrorCode:forFilePath:
+ errorWithErrorCode:forFilePath:additionalInformation:
- initWithErrorCode:
- initWithErrorCode:forFilePath:
- initWithErrorCode:forFilePath:additionalInformation:
- initWithErrorCode:errorDomain:forFilePath:additionalInformation:
###DBCDatabaseRow misc
+ errorDescriptionByCode:

##Class methods

errorWithErrorCode:

Create and initialize DBCError instance for specified error code.

+ (NSString*)errorWithErrorCode:(int)errorCode

Parameters
errorCode
    Error code, which allows you to identify reasons, that caused an error.

Return value
Autoreleased DBCError instance.

See Also
+ errorWithErrorCode:forFilePath:
+ errorWithErrorCode:forFilePath:additionalInformation:

Top


errorWithErrorCode:forFilePath:

Create and initialize DBCError instance for specified error code and path to the file, which probably caused an error.

+ (NSString*)errorWithErrorCode:(int)errorCode forFilePath:(NSString*)filePath

Parameters
errorCode
    Error code, VALUES (identify reasons of the error).
filePath
    Path to the file, which was the reason of the error.

Return value
Autoreleased DBCError instance.

See Also
+ errorWithErrorCode:
+ errorWithErrorCode:forFilePath:additionalInformation:

Top


errorWithErrorCode:forFilePath:additionalInformation:

Create and initialize DBCError instance for specified error code, path to file which probably caused an error and some additional information.

+ (NSString*)errorWithErrorCode:(int)errorCode forFilePath:(NSString*)filePath
          additionalInformation:(NSString*)additionalInformation

Parameters
errorCode
    Error code, which allows you to identify reasons of the error.
filePath
    Path to the file, which was the reason of the error.
additionalInformation
    Additional information about the error.

Return value
Autoreleased DBCError instance.

See Also
+ errorWithErrorCode:
+ errorWithErrorCode:forFilePath:

Top


errorDescriptionByCode:

Return string equivalent of the error code.

+ (NSString*)errorDescriptionByCode:(int)errorCode

Parameters
errorCode
    Error code, which allows you to identify reasons of the error.

Return value
Translated into string error code.

Top

##Instance methods

initWithErrorCode:

Initialize DBCError instance for specified error code.

- (id)initWithErrorCode:(NSInteger)code

Parameters
errorCode
    Error code which allows to identify reasons of the error.

Return value
Initialized DBCError instance.

See Also
- initWithErrorCode:forFilePath:
- initWithErrorCode:forFilePath:additionalInformation:
- initWithErrorCode:errorDomain:forFilePath:additionalInformation:

Top


initWithErrorCode:forFilePath:

Initialize DBCError instance for specified error code and path to file which probably caused an error.

- (id)initWithErrorCode:(NSInteger)code forFilePath:(NSString*)filePath

Parameters
errorCode
    Error code, which allows you to identify reasons of the error. filePath
    Path to the file, which was the reason of the error.

Return value
Initialized DBCError instance.

See Also
- initWithErrorCode:
- initWithErrorCode:forFilePath:additionalInformation:
- initWithErrorCode:errorDomain:forFilePath:additionalInformation:

Top


initWithErrorCode:forFilePath:additionalInformation:

Initialize DBCError instance for specified error code, path to file which probably caused an error and some additional information.

- (id)initWithErrorCode:(NSInteger)code forFilePath:(NSString*)filePath 
  additionalInformation:(NSString*)additionalInformation

Parameters
errorCode
    Error code, which allows you to identify reasons of the error. filePath
    Path to the file, which was the reason of the error.
additionalInformation
    Additional information about an error.

Return value
Initialized DBCError instance.

See Also
- initWithErrorCode:
- initWithErrorCode:forFilePath:
- initWithErrorCode:errorDomain:forFilePath:additionalInformation:

Top


initWithErrorCode:errorDomain:forFilePath:additionalInformation:

Initialize DBCError instance for specified error code, error domain, path to file, which probably caused an error and some additional information.

- (id)initWithErrorCode:(NSInteger)code errorDomain:(NSString*)errorDomain forFilePath:(NSString*)filePath 
  additionalInformation:(NSString*)additionalInformation

Parameters
errorCode
    Error code, which allows you to identify reasons of the error.
errorDomain
    Error domain.
filePath
    Path to the file, which was the reason of the error. additionalInformation
    Additional information about an error.

Return value
Initialized DBCError instance.

See Also
- initWithErrorCode:
- initWithErrorCode:forFilePath:
- initWithErrorCode:forFilePath:additionalInformation:

Top

Clone this wiki locally