Add project files
This commit is contained in:
commit
f2fe6b8855
114 files changed
+20525
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user