zorba::os_error::exception

#include <zorba/util/error_util.h>

An exception is-a std::runtime_error for reporting errors with operating system or library functions.

Protected Attributes

std::string

function_

std::string

message_

std::string

path_

Public Functions

exception(char const *function, char const *path, char const *err_string=nullptr)

Constructs an exception.

std::string const &

function() const

Gets the name of the function that failed.

std::string const &

path() const

Gets the full path of the file or directory involved in the failure.

char const *

what() const

~exception()

Destroys an exception.

Protected Attributes

function_

std::string function_

message_

std::string message_

path_

std::string path_

Public Functions

exception

 exception(char const *function, char const *path, char const *err_string=nullptr)

Constructs an exception.

Parameters

function The name of the operating system function that failed, if any.
path The full path of the file or directory involved in the failure, if any.
err_string If not nullptr, the error string to use instead of the operating system error string; if empty, no error string is used.

function

std::string const & function() const

Gets the name of the function that failed.

Returns

Returns said function name.

path

std::string const & path() const

Gets the full path of the file or directory involved in the failure.

Returns

Returns said path.

what

char const * what() const

~exception

 ~exception()

Destroys an exception.