mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 10:23:54 +00:00
a67525fae1
Summary: Pull Request resolved: https://github.com/facebook/osquery/pull/5375 LICENSE is now defined in a single file on the root of the project, update the header to contain that information. **Project LICENSE did not change.** Reviewed By: akindyakov Differential Revision: D13750575 fbshipit-source-id: 1e608a81b260b8395f9d008fc67f463160c1fc2b
29 lines
702 B
C++
29 lines
702 B
C++
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed as defined on the LICENSE file found in the
|
|
* root directory of this source tree.
|
|
*/
|
|
|
|
#include "status.h"
|
|
|
|
#include <cassert>
|
|
|
|
namespace osquery {
|
|
|
|
constexpr int Status::kSuccessCode;
|
|
|
|
Status Status::failure(int code, std::string message) {
|
|
assert(code != Status::kSuccessCode &&
|
|
"Using 'failure' to create Status object with a kSuccessCode");
|
|
return Status(code, std::move(message));
|
|
}
|
|
|
|
::std::ostream& operator<<(::std::ostream& os, const Status& s) {
|
|
return os << "Status(" << s.getCode() << R"(, ")" << s.getMessage()
|
|
<< R"("))";
|
|
}
|
|
|
|
} // namespace osquery
|