smtp-client
SMTP Client C Library
SMTPMailException Class Reference

#include <SMTPMail.h>

+ Inheritance diagram for SMTPMailException:
+ Collaboration diagram for SMTPMailException:

Public Member Functions

 SMTPMailException (enum smtp_status_code status_code)
 
virtual const char *const what () throw ()
 

Private Attributes

enum smtp_status_code status_code
 

Detailed Description

This exception will get thrown whenever an SMTP client function fails.

Definition at line 23 of file SMTPMail.h.

Constructor & Destructor Documentation

◆ SMTPMailException()

SMTPMailException::SMTPMailException ( enum smtp_status_code  status_code)

Create the exception with the corresponding status_code.

Parameters
[in]status_codeAn error status code returned from a previous call to an smtp-client library function.

Definition at line 13 of file SMTPMail.cpp.

References status_code.

Referenced by SMTPMail::throw_bad_status_code().

13  {
14  this->status_code = status_code;
15 }
enum smtp_status_code status_code
Definition: SMTPMail.h:45
+ Here is the caller graph for this function:

Member Function Documentation

◆ what()

const char *const SMTPMailException::what ( )
throw (
)
virtual

Get a description of the smtp-client status code that caused this exception.

Returns
Null-terminated string describing the smtp-client status code.

Definition at line 18 of file SMTPMail.cpp.

References smtp_status_code_errstr(), and status_code.

Referenced by main().

18  {
20 }
const char * smtp_status_code_errstr(enum smtp_status_code status_code)
Definition: smtp.c:3241
enum smtp_status_code status_code
Definition: SMTPMail.h:45
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ status_code

enum smtp_status_code SMTPMailException::status_code
private

The status code generated by any of the smtp-client library functions.

Definition at line 45 of file SMTPMail.h.

Referenced by SMTPMailException(), and what().


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