plcopen 0.22.0
载入中...
搜索中...
未找到
error_text.h
浏览该文件的文档.
1#pragma once
2
3#include "rt/error.h"
4
5namespace plcopen::core::rt
6{
7
8constexpr const char *to_string(ErrorCode code)
9{
10 switch(code) {
11 case ErrorCode::ok:
12 return "ok";
14 return "invalid_argument: a parameter value is out of its valid domain";
16 return "out_of_range: a value exceeds an array or container bound";
18 return "capacity_exceeded: a fixed-size container is full";
20 return "infeasible: no solution exists for the given constraints";
22 return "not_converged: the bounded numerical solve exhausted its iteration budget";
24 return "singular_region: damping reached its limit in an ill-conditioned region";
26 return "limit_infeasible: hard joint limits prevent the requested solution";
28 return "precondition_failed: the object is not in the required state";
30 return "unsupported: this operation is not implemented";
32 return "bytecode_version_mismatch: recompile the ST source for this runtime";
33 }
34 return "unknown error code";
35}
36
37} // namespace plcopen::core::rt
constexpr const char * to_string(ErrorCode code)