0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
clanguml::error::diagram_generation_error Class Reference

Detailed Description

Definition at line 43 of file error.h.

#include <error.h>

Public Member Functions

 diagram_generation_error (common::model::diagram_t type, std::string name, std::string description)
 
const char * what () const noexcept override
 
const std::string & diagram_name () const noexcept
 
common::model::diagram_t diagram_type () const noexcept
 

Private Attributes

common::model::diagram_t type_
 
std::string name_
 
std::string message_
 

Constructor & Destructor Documentation

◆ diagram_generation_error()

clanguml::error::diagram_generation_error::diagram_generation_error ( common::model::diagram_t  type,
std::string  name,
std::string  description 
)
inline

Definition at line 45 of file error.h.

47 : std::runtime_error{description}
48 , type_{type}
49 , name_{std::move(name)}
50 {
51 message_ =
52 fmt::format("Generation of {} diagram '{}' failed due to: {}",
53 diagram_type(), diagram_name(), description);
54 }

Member Function Documentation

◆ diagram_name()

const std::string & clanguml::error::diagram_generation_error::diagram_name ( ) const
inlinenoexcept

Definition at line 58 of file error.h.

58{ return name_; }

◆ diagram_type()

common::model::diagram_t clanguml::error::diagram_generation_error::diagram_type ( ) const
inlinenoexcept

Definition at line 59 of file error.h.

59{ return type_; }

◆ what()

const char * clanguml::error::diagram_generation_error::what ( ) const
inlineoverridenoexcept

Definition at line 56 of file error.h.

56{ return message_.c_str(); }

Member Data Documentation

◆ message_

std::string clanguml::error::diagram_generation_error::message_
private

Definition at line 65 of file error.h.

◆ name_

std::string clanguml::error::diagram_generation_error::name_
private

Definition at line 63 of file error.h.

◆ type_

common::model::diagram_t clanguml::error::diagram_generation_error::type_
private

Definition at line 62 of file error.h.


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