1#include <${ '/'.join(error.name.split('.')) }/error.hpp>
2<% namespaces = error.name.split('.') %>
3namespace sdbusplus
4{
5    % for s in namespaces:
6namespace ${s}
7{
8    % endfor
9namespace Error
10{
11    % for e in error.errors:
12const char* ${e.name}::name() const noexcept
13{
14    return errName;
15}
16const char* ${e.name}::description() const noexcept
17{
18    return errDesc;
19}
20const char* ${e.name}::what() const noexcept
21{
22    return errWhat;
23}
24    % if e.errno:
25int ${e.name}::get_errno() const noexcept
26{
27    return errErrno;
28}
29    % endif
30    % endfor
31
32} // namespace Error
33    % for s in reversed(namespaces):
34} // namespace ${s}
35    % endfor
36} // namespace sdbusplus
37