X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fsync%2Fapi%2Fsync_error.h;h=281621e55b7adba45484517739c6cd333b54ed63;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=f6ffa87f3132c8c795bb60aeb00e6e81542c26b0;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/sync/api/sync_error.h b/src/sync/api/sync_error.h index f6ffa87..281621e 100644 --- a/src/sync/api/sync_error.h +++ b/src/sync/api/sync_error.h @@ -38,8 +38,18 @@ class SYNC_EXPORT SyncError { // datataype should be associated after a sync update. CRYPTO_ERROR, // A cryptographer error was detected, and the // datatype should be associated after it is resolved. - UNREADY_ERROR, // The type is not ready to start yet, so should be + UNREADY_ERROR, // A datatype is not ready to start yet, so should be // neither purged nor enabled until it is ready. + DATATYPE_POLICY_ERROR // A datatype should be disabled and purged due + // to configuration constraints. + }; + + // Severity is used to indicate how an error should be logged and + // represented to an end user. + enum Severity { + SYNC_ERROR_SEVERITY_ERROR, // Severe unrecoverable error. + SYNC_ERROR_SEVERITY_INFO // Low-severity recoverable error or + // configuration policy issue. }; // Default constructor refers to "no error", and IsSet() will return false. @@ -76,6 +86,11 @@ class SYNC_EXPORT SyncError { ModelType model_type() const; ErrorType error_type() const; + // Error severity for logging and UI purposes. + Severity GetSeverity() const; + // Type specific message prefix for logging and UI purposes. + std::string GetMessagePrefix() const; + // Returns empty string is IsSet() is false. std::string ToString() const; private: