irccd  3.0.3
Public Types | Public Member Functions | List of all members
irccd::daemon::plugin_error Class Reference

Plugin error. More...

#include <plugin.hpp>

Inheritance diagram for irccd::daemon::plugin_error:

Public Types

enum  error {
  no_error = 0, invalid_identifier, not_found, exec_error,
  already_exists
}
 Plugin related errors. More...
 

Public Member Functions

 plugin_error (error code, std::string id, std::string message="")
 
auto get_id () const noexcept -> const std::string &
 
auto get_message () const noexcept -> const std::string &
 
auto what () const noexcept -> const char *override
 

Detailed Description

Plugin error.

Member Enumeration Documentation

◆ error

Plugin related errors.

Enumerator
no_error 

No error.

The specified identifier is invalid.

invalid_identifier 

The specified plugin is not found.

not_found 

The plugin was unable to run the function.

exec_error 

The plugin is already loaded.

already_exists 

Constructor & Destructor Documentation

◆ plugin_error()

irccd::daemon::plugin_error::plugin_error ( error  code,
std::string  id,
std::string  message = "" 
)

Constructor.

Parameters
codethe error code
idthe plugin id
messagethe optional message (e.g. error from plugin)

Member Function Documentation

◆ get_id()

auto irccd::daemon::plugin_error::get_id ( ) const -> const std::string &
noexcept

Get the plugin identifier.

Returns
the id

◆ get_message()

auto irccd::daemon::plugin_error::get_message ( ) const -> const std::string &
noexcept

Get the additional message.

Returns
the message

◆ what()

auto irccd::daemon::plugin_error::what ( ) const -> const char *override
overridenoexcept

Get message appropriate for use with logger.

Returns
the error message

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