This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TS status.

### 2655. [filesys.ts] [PDTS] Clarify Error reporting

Section: 7 [filesys.ts::fs.err.report] Status: TS Submitter: Beman Dawes Opened: 2014-01-20 Last modified: 2017-07-30

Priority: Not Prioritized

View all other issues in [filesys.ts::fs.err.report].

View all issues with TS status.

Discussion:

Addresses: filesys.ts

The proposed change below was suggested in Issaquah as part of the resolution of issue 13 to clarify the Error reporting section. LWG/SG3 liked the change, but since issue 13 was NAD requested that a separate issue be opened.

[2014-02-13 LWG/SG-3 Issaquah: Proposed wording accepted.]

Proposed resolution:

Change 7 [fs.err.report]:

> Functions not having an argument of type `error_code&` report errors as follows, unless otherwise specified:

> - When a call by the implementation to an operating system or other underlying API results in an error that prevents the function from meeting its specifications, an exception of type `filesystem_error` shall be thrown. For functions with a single path argument, that argument shall be passed to the `filesystem_error` constructor with a single path argument. For functions with two path arguments, the first of these arguments shall be passed to the `filesystem_error` constructor as the `path1` argument, and the second shall be passed as the `path2` argument. The `filesystem_error` constructor's `error_code` argument is set as appropriate for the specific operating system dependent error.
> - Failure to allocate storage is reported by throwing an exception as described in C++11 § 17.6.4.10.
> - Destructors throw nothing.

> Functions having an argument of type `error_code&` report errors as follows, unless otherwise specified:

> - If a call by the implementation to an operating system or other underlying API results in an error that prevents the function from meeting its specifications, the `error_code&` argument is set as appropriate for the specific operating system dependent error. Otherwise, `clear()` is called on the `error_code&` argument.