crocoddyl 1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
 
Loading...
Searching...
No Matches
exception.cpp
1
2// BSD 3-Clause License
3//
4// Copyright (C) 2019-2020, University of Edinburgh
5// Copyright note valid unless otherwise stated in individual files.
6// All rights reserved.
8
9#include "crocoddyl/core/utils/exception.hpp"
10
11namespace crocoddyl {
12
13Exception::Exception(const std::string &msg, const char *file, const char *func, int line) {
14 std::stringstream ss;
15 ss << "In " << file << "\n";
16 ss << func << " ";
17 ss << line << "\n";
18 ss << msg;
19 msg_ = ss.str();
20}
21
22Exception::~Exception() NOEXCEPT {}
23
24const char *Exception::what() const NOEXCEPT { return msg_.c_str(); }
25
26} // namespace crocoddyl