Subversion Repositories SmartDukaan

Rev

Rev 4496 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4496 Rev 4846
Line 3... Line 3...
3
 
3
 
4
enum ExceptionType {
4
enum ExceptionType {
5
    NULL_POINTER = 101,
5
    NULL_POINTER = 101,
6
    ILLEGAL_ARGUMENTS = 102,
6
    ILLEGAL_ARGUMENTS = 102,
7
    DATABASE_ERROR = 103,
7
    DATABASE_ERROR = 103,
8
    NOT_AUTHORIZED = 104
8
    NOT_AUTHORIZED = 104,
-
 
9
    MULTIPLE_ITEMS_FOUND = 105 // In the message we pass the comma separated item ids
9
}
10
}
10
 
11
 
11
const map<ExceptionType, string> EXCEPTION_TYPES_DESCRIPTION = {
12
const map<ExceptionType, string> EXCEPTION_TYPES_DESCRIPTION = {
12
    ExceptionType.NULL_POINTER : "Null pointer exception",
13
    ExceptionType.NULL_POINTER : "Null pointer exception",
13
    ExceptionType.ILLEGAL_ARGUMENTS : "Illegal arguments, could not lookup",
14
    ExceptionType.ILLEGAL_ARGUMENTS : "Illegal arguments, could not lookup",
14
    ExceptionType.DATABASE_ERROR : "Error in the DB layer",
15
    ExceptionType.DATABASE_ERROR : "Error in the DB layer",
15
    ExceptionType.NOT_AUTHORIZED : "Not authorized"
16
    ExceptionType.NOT_AUTHORIZED : "Not authorized",
-
 
17
    ExceptionType.MULTIPLE_ITEMS_FOUND : "Multiple items found"
16
};
18
};
17
 
19
 
18
service GenericService{
20
service GenericService{
19
	/**
21
	/**
20
	* For checking weather service is active alive or not. It also checks connectivity with database
22
	* For checking weather service is active alive or not. It also checks connectivity with database