<experimental/filesystem> Classe filesystem_error

Importante

Questo articolo descrive l'implementazione prendard <experimental/filesystem> di filesystem_error. Documenta la specifica tecnica del file system cronologica (ISO/IEC JTC 1/SC 22/WG 21 N4100), non la classe C++17 std::filesystem::filesystem_error . L'implementazione sperimentale è stata rimossa a partire da MSVC versione 14.51. Per il codice corrente, usare la classe filesystem_error standard.

Classe di base per tutte le eccezioni generate per segnalare un errore di sistema di basso livello.

Sintassi

class filesystem_error : public system_error;

Osservazioni

La classe funge da classe di base per tutte le eccezioni generate per segnalare un errore nelle <funzioni sperimentale/file system> . Archivia un oggetto di tipo string, chiamato mymesg qui ai fini dell'esposizione. Archivia anche due oggetti di tipo path, denominati mypval1 e mypval2.

Members

Constructors

Name Descrzione
filesystem_error Costruisce un filesystem_error messaggio.

Functions

Name Descrzione
path1 Restituisce mypval1
path2 Restituisce mypval2
che cosa Restituisce un puntatore a un oggetto NTBS.

Requirements

Intestazione:<sperimentale/file system>

Spazio dei nomi: std::experimental::filesystem

filesystem_error

Il primo costruttore costruisce il messaggio da what_arg ed ec. Il secondo costruttore costruisce anche il messaggio da pval1, che archivia in mypval1. Il terzo costruttore costruisce 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.

Ce
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;

che cosa

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;

Vedere anche

<experimental/filesystem>
path classe