/*
   Copyright (c) 2018-2019 Nokia.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

#include "private/tst/wellknownerrorcode.hpp"
#include <cerrno>

using namespace shareddatalayer;
using namespace shareddatalayer::tst;

std::error_code shareddatalayer::tst::getWellKnownErrorCode()
{
    return std::error_code(EINVAL, std::system_category());
}

std::string shareddatalayer::tst::getWellKnownErrorCodeMessage()
{
    return getWellKnownErrorCode().message();
}
