wrench::NotAllowed Class Reference

A "operation not allowed" failure cause. More...

#include <NotAllowed.h>

Inheritance diagram for wrench::NotAllowed:
wrench::FailureCause

Public Member Functions

 NotAllowed (std::shared_ptr< Service > service, std::string &error_message)
 Constructor. More...
 
std::shared_ptr< ServicegetService ()
 Get the service that caused the error. More...
 
std::string toString ()
 Get the human-readable failure message. More...
 

Detailed Description

A "operation not allowed" failure cause.

Constructor & Destructor Documentation

◆ NotAllowed()

wrench::NotAllowed::NotAllowed ( std::shared_ptr< Service service,
std::string &  error_message 
)

Constructor.

Parameters
servicethe service that cause the error (or nullptr if no known service for the error)
error_messagea custom error message

Member Function Documentation

◆ getService()

std::shared_ptr< Service > wrench::NotAllowed::getService ( )

Get the service that caused the error.

Returns
the service

◆ toString()

std::string wrench::NotAllowed::toString ( )
virtual

Get the human-readable failure message.

Returns
the message

Implements wrench::FailureCause.


The documentation for this class was generated from the following files: