~michihenning/storage-framework/check-server-side-metadata

« back to all changes in this revision

Viewing changes to src/provider/internal/TestServerImpl.cpp

  • Committer: Tarmac
  • Author(s): Michi Henning
  • Date: 2016-08-12 06:09:45 UTC
  • mfrom: (51.1.1 provider-exceptions)
  • Revision ID: tarmac-20160812060945-psm2sooaz09q5zfk
Replaced runtime_error with storage exceptions on server side.

Approved by James Henstridge, unity-api-1-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 */
18
18
 
19
19
#include <unity/storage/provider/internal/TestServerImpl.h>
 
20
#include <unity/storage/provider/Exceptions.h>
20
21
#include <unity/storage/provider/ProviderBase.h>
21
22
#include <unity/storage/provider/internal/AccountData.h>
22
23
#include <unity/storage/provider/internal/DBusPeerCache.h>
57
58
    if (!connection_.registerObject(QString::fromStdString(object_path_),
58
59
                                   interface_.get()))
59
60
    {
60
 
        throw runtime_error("Could not register provider on connection");
 
61
        string msg = "Could not register provider on connection: " + connection_.lastError().message().toStdString();
 
62
        throw ResourceException(msg, int(connection_.lastError().type()));
61
63
    }
62
64
}
63
65