Support Class Library
A set of tools providing classes and utility
EmptyOptionalAccess.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <scl/macros.h>
5 
6 namespace scl{
7  namespace exceptions{
12  public:
14  realConst(char*) type() const noexcept override{
15  return "scl::exceptions::EmptyOptionalAccess";
16  }
17 
21  EmptyOptionalAccess() : EmptyOptionalAccess("Tried to access the value of an empty Optional"){}
22  };
23  }
24 }
Global namespace of the SCL.
Definition: alias.hpp:3
EmptyOptionalAccess()
Constructor that uses a default error message.
#define realConst(type)
Definition: macros.h:3
Exception(T &&reason)
Construct an scl::exceptions::Exception from an error message.
Definition: Exception.h:27
Base class for all regular exceptions.
Definition: Exception.h:12
Exception class used when attempting to access the value of an empty scl::utils::Optional.
const char *const type() const noexcept override
The name of this Throwable type.