OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches

Error/warning description table and formatting — legacy-compatible. More...

#include "ErrorCodes.hpp"
#include <cstdio>
#include <unordered_map>
Include dependency graph for ErrorCodes.cpp:

Namespaces

namespace  openswmm
 

Functions

std::string_view openswmm::error_get_template (int code) noexcept
 Get the description template for an error code.
 
std::string_view openswmm::warning_get_template (int code) noexcept
 Get the description template for a warning code.
 
std::string openswmm::format_error (int code, std::string_view name="")
 Format an error message with object name substitution.
 
std::string openswmm::format_error (int code, std::string_view name, std::string_view detail)
 Format an error message with object name and additional detail.
 
std::string openswmm::format_warning (int code, std::string_view name="")
 Format a warning message with object name substitution.
 
std::string openswmm::format_warning (int code, std::string_view name, std::string_view detail)
 Format a warning with additional detail.
 
std::string_view openswmm::cffi_error_get_template (int code) noexcept
 Get the description for a CFFI error code (SWMM_ErrorCode).
 
std::string_view openswmm::cffi_warning_get_template (int code) noexcept
 Get the description for a CFFI warning code (SWMM_WarnCode).
 
std::string openswmm::format_cffi_error (int code, std::string_view name="")
 Format a CFFI error message.
 
std::string openswmm::format_cffi_warning (int code, std::string_view name="")
 Format a CFFI warning message.
 

Detailed Description

Error/warning description table and formatting — legacy-compatible.

Description strings are taken verbatim from the legacy SWMM error.txt and text.h, preserving the s placeholder convention. New 6.0 codes (600+) follow the same pattern.

See also
ErrorCodes.hpp
Legacy reference: src/solver/error.txt, src/solver/error.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License