wrench::NotAllowed

class NotAllowed : public wrench::FailureCause

A “operation not allowed” failure cause.

Public Functions

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

Constructor.

Parameters:
  • service – the service that cause the error (or nullptr if no known service for the error)

  • error_message – a custom error message

std::shared_ptr<Service> getService()

Get the service that caused the error.

Returns:

the service

virtual std::string toString() override

Get the human-readable failure message.

Returns:

the message