mirror of https://github.com/commaai/openpilot.git
Params: better error logging on constructor (#29954)
* ensure params path * static anlysis * revert that
This commit is contained in:
parent
747a6149b4
commit
8aad9758cf
|
@ -64,7 +64,7 @@ bool create_params_path(const std::string ¶m_path, const std::string &key_pa
|
|||
std::string ensure_params_path(const std::string &prefix, const std::string &path = {}) {
|
||||
std::string params_path = path.empty() ? Path::params() : path;
|
||||
if (!create_params_path(params_path, params_path + prefix)) {
|
||||
throw std::runtime_error(util::string_format("Failed to ensure params path, errno=%d", errno));
|
||||
throw std::runtime_error(util::string_format("Failed to ensure params path, errno=%d, path=%s", errno, params_path.c_str()));
|
||||
}
|
||||
return params_path;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ cdef extern from "common/params.h":
|
|||
ALL
|
||||
|
||||
cdef cppclass c_Params "Params":
|
||||
c_Params(string) nogil
|
||||
c_Params(string) nogil except +
|
||||
string get(string, bool) nogil
|
||||
bool getBool(string, bool) nogil
|
||||
int remove(string) nogil
|
||||
|
|
Loading…
Reference in New Issue