Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Signed-off-by: siyuan0322 <[email protected]>
  • Loading branch information
siyuan0322 committed Jul 31, 2024
1 parent 8e7154d commit 78aed73
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/graph/utils/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ limitations under the License.
#ifndef MODULES_GRAPH_UTILS_ERROR_H_
#define MODULES_GRAPH_UTILS_ERROR_H_

#include <iomanip>
#include <numeric>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <iomanip>
#include <sstream>

#if defined(__has_include) && __has_include(<version>)
#include <version>
Expand Down Expand Up @@ -113,11 +113,13 @@ struct GSError {

explicit GSError(ErrorCode code) : GSError(code, "") {}

GSError(ErrorCode code, std::string msg)
: GSError(code, msg, "") {}
GSError(ErrorCode code, std::string msg) : GSError(code, msg, "") {}

GSError(ErrorCode code, std::string msg, std::string bt)
: error_code(code), error_msg(std::move(msg)), backtrace(std::move(bt)), ec(formatEnumValue(code)) {}
: error_code(code),
error_msg(std::move(msg)),
backtrace(std::move(bt)),
ec(formatEnumValue(code)) {}

explicit operator bool() const { return error_code != ErrorCode::kOk; }

Expand Down

0 comments on commit 78aed73

Please sign in to comment.