Classe filesystem_error

Classe di base per tutte le eccezioni che segnalano un errore di sistema di basso livello.

Sintassi

class filesystem_error : public system_error;

Osservazioni:

Questa classe funge da classe di base per tutte le eccezioni che segnalano un errore nelle <filesystem> funzioni. Archivia un string oggetto, chiamato mymesg in questo articolo per maggiore chiarezza. Archivia anche due path oggetti, denominati mypval1 e mypval2.

Membri

Costruttori

Nome Descrizione
filesystem_error Costruisce un filesystem_error messaggio.

Funzioni

Nome Descrizione
path1 Restituisce mypval1.
path2 Restituisce mypval2.
what Rappresenta un puntatore a un oggetto NTBS.

Requisiti

Intestazione:<filesystem>

Spazio dei nomi:std::filesystem

filesystem_error

Il primo costruttore compila il messaggio da what_arg e ec. Il secondo costruttore compila anche il messaggio da pval1, che archivia in mypval1. Il terzo costruttore compila anche il messaggio da pval1, che archivia in mypval1e da pval2, che archivia in mypval2.

filesystem_error(const string& what_arg,
    error_code ec);

filesystem_error(const string& what_arg,
    const path& pval1,
    error_code ec);

filesystem_error(const string& what_arg,
    const path& pval1,
    const path& pval2,
    error_code ec);

Parametri

what_arg
Messaggio specificato.

ec
Codice di errore specificato.

mypval1
Parametro del messaggio specificato ulteriormente.

mypval2
Parametro del messaggio specificato ulteriormente.

path1

La funzione membro restituisce mypval1

const path& path1() const noexcept;

path2

La funzione membro restituisce mypval2

const path& path2() const noexcept;

what

La funzione membro restituisce un puntatore a un NTBSoggetto , preferibilmente composto da runtime_error::what(), system_error::what()mymesg, mypval1.native_string(), e mypval2.native_string().

const char *what() const noexcept;