Files
Breeze/source/BreezeCore/include/breeze/Error.hpp
T
2026-10-24 09:53:48 -03:00

25 lines
456 B
C++

#pragma once
#include <stdexcept>
#include <string>
namespace breeze
{
/// Every failure the CLI reports to the user: a message and the process exit code to end with.
class Error : public std::runtime_error
{
public:
explicit Error(const std::string& message, int exitCode = 1)
: std::runtime_error(message), m_exitCode(exitCode)
{
}
[[nodiscard]] int exitCode() const noexcept { return m_exitCode; }
private:
int m_exitCode;
};
}