From ee7bd686bdda990bf16fb9a540f8875d5c72864c Mon Sep 17 00:00:00 2001 From: DanB Date: Wed, 12 Jun 2013 12:33:06 +0200 Subject: [PATCH] Adding NOT_IMPLEMENTED error at storage level --- rater/storage_gosexy.go | 3 ++- rater/storage_mongo.go | 3 ++- rater/storage_redigo.go | 3 ++- utils/consts.go | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rater/storage_gosexy.go b/rater/storage_gosexy.go index 1bf3fc0b4..4265aa85a 100644 --- a/rater/storage_gosexy.go +++ b/rater/storage_gosexy.go @@ -20,6 +20,7 @@ package rater import ( "fmt" + "errors" "menteslibres.net/gosexy/redis" //"log" "github.com/cgrates/cgrates/utils" @@ -103,7 +104,7 @@ func (rs *GosexyStorage) SetDestination(dest *Destination) (err error) { // Extracts destinations from StorDB on specific tariffplan id func (rs *GosexyStorage) GetTPDestination( tpid, destTag string ) (*Destination, error) { - return nil, nil + return nil, errors.New(utils.ERR_NOT_IMPLEMENTED) } func (rs *GosexyStorage) GetActions(key string) (as Actions, err error) { diff --git a/rater/storage_mongo.go b/rater/storage_mongo.go index 5c63e2496..e586d788f 100644 --- a/rater/storage_mongo.go +++ b/rater/storage_mongo.go @@ -20,6 +20,7 @@ package rater import ( "fmt" + "errors" "github.com/cgrates/cgrates/utils" "labix.org/v2/mgo" "labix.org/v2/mgo/bson" @@ -148,7 +149,7 @@ func (ms *MongoStorage) SetDestination(dest *Destination) error { // Extracts destinations from StorDB on specific tariffplan id func (ms *MongoStorage) GetTPDestination( tpid, destTag string ) (*Destination, error) { - return nil, nil + return nil, errors.New(utils.ERR_NOT_IMPLEMENTED) } func (ms *MongoStorage) GetActions(key string) (as Actions, err error) { diff --git a/rater/storage_redigo.go b/rater/storage_redigo.go index d4e1a59fb..58ee01ea6 100644 --- a/rater/storage_redigo.go +++ b/rater/storage_redigo.go @@ -20,6 +20,7 @@ package rater import ( "fmt" + "errors" "github.com/garyburd/redigo/redis" //"log" "github.com/cgrates/cgrates/utils" @@ -95,7 +96,7 @@ func (rs *RedigoStorage) SetDestination(dest *Destination) (err error) { // Extracts destinations from StorDB on specific tariffplan id func (rs *RedigoStorage) GetTPDestination( tpid, destTag string ) (*Destination, error) { - return nil, nil + return nil, errors.New(utils.ERR_NOT_IMPLEMENTED) } func (rs *RedigoStorage) GetActions(key string) (as Actions, err error) { diff --git a/utils/consts.go b/utils/consts.go index b1e0c697f..98bbaf627 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -9,6 +9,7 @@ const ( POSTPAID = "postpaid" PSEUDOPREPAID = "pseudoprepaid" RATED = "rated" + ERR_NOT_IMPLEMENTED = "NOT_IMPLEMENTED" ERR_SERVER_ERROR = "SERVER_ERROR" ERR_DST_NOT_FOUND = "DESTINATION_NOT_FOUND" ERR_MANDATORY_IE_MISSING = "MANDATORY_IE_MISSING"