Electroneum
tools::error::not_enough_etn Struct Reference

#include <wallet_errors.h>

Inheritance diagram for tools::error::not_enough_etn:
Collaboration diagram for tools::error::not_enough_etn:

Public Member Functions

 not_enough_etn (std::string &&loc, uint64_t available, uint64_t tx_amount, uint64_t fee)
 
uint64_t available () const
 
uint64_t tx_amount () const
 
std::string to_string () const
 
- Public Member Functions inherited from tools::error::wallet_error_base< Base >
const std::string & location () const
 
std::string to_string () const
 

Additional Inherited Members

- Protected Member Functions inherited from tools::error::transfer_error
 transfer_error (std::string &&loc, const std::string &message)
 
- Protected Member Functions inherited from tools::error::wallet_error_base< Base >
 wallet_error_base (std::string &&loc, const std::string &message)
 

Detailed Description

Definition at line 499 of file wallet_errors.h.

Constructor & Destructor Documentation

◆ not_enough_etn()

tools::error::not_enough_etn::not_enough_etn ( std::string &&  loc,
uint64_t  available,
uint64_t  tx_amount,
uint64_t  fee 
)
inlineexplicit

Definition at line 501 of file wallet_errors.h.

502  : transfer_error(std::move(loc), "not enough ETN")
503  , m_available(available)
504  , m_tx_amount(tx_amount)
505  {
506  }
const T & move(const T &t)
Definition: gtest-port.h:1317
transfer_error(std::string &&loc, const std::string &message)

Member Function Documentation

◆ available()

uint64_t tools::error::not_enough_etn::available ( ) const
inline

Definition at line 508 of file wallet_errors.h.

508 { return m_available; }

◆ to_string()

std::string tools::error::not_enough_etn::to_string ( ) const
inline

Definition at line 511 of file wallet_errors.h.

512  {
513  std::ostringstream ss;
514  ss << transfer_error::to_string() <<
515  ", available = " << cryptonote::print_etn(m_available) <<
516  ", tx_amount = " << cryptonote::print_etn(m_tx_amount);
517  return ss.str();
518  }
std::string print_etn(uint64_t amount, unsigned int decimal_point)
std::string to_string() const
Here is the call graph for this function:

◆ tx_amount()

uint64_t tools::error::not_enough_etn::tx_amount ( ) const
inline

Definition at line 509 of file wallet_errors.h.

509 { return m_tx_amount; }

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