Added new exception class for internal fatal errors

This commit is contained in:
Nav
2024-02-13 20:47:08 +00:00
parent a8a679320c
commit d47e807a5d

View File

@@ -0,0 +1,22 @@
#pragma once
#include "Exception.hpp"
#include "src/Services/PathService.hpp"
namespace Exceptions
{
class InternalFatalErrorException: public Exception
{
public:
explicit InternalFatalErrorException(const std::string& message)
: Exception(
"Internal fatal error - " + message + " - please report this via "
+ Services::PathService::homeDomainName() + "/report-issue"
)
{}
explicit InternalFatalErrorException(const char* message)
: InternalFatalErrorException(std::string(message))
{}
};
}