Update docs to specify exception type

This commit is contained in:
mandreyel 2018-10-26 09:00:27 +02:00
parent a345b8b92d
commit d33a0d567f
3 changed files with 13 additions and 9 deletions

View File

@ -20,7 +20,7 @@ NOTE: the file must exist before creating a mapping.
There are three ways to map a file into memory:
- Using the constructor, which throws on failure:
- Using the constructor, which throws a `std::system_error` on failure:
```c++
mio::mmap_source mmap(path, offset, size_to_map);
```

View File

@ -104,8 +104,9 @@ public:
basic_mmap() = default;
/**
* The same as invoking the `map` function, except any error that may occur while
* establishing the mapping is thrown.
* The same as invoking the `map` function, except any error that may occur
* while establishing the mapping is wrapped in a `std::system_error` and is
* thrown.
*/
template<typename String>
basic_mmap(const String& path, const size_type offset = 0, const size_type length = map_entire_file)
@ -116,8 +117,9 @@ public:
}
/**
* The same as invoking the `map` function, except any error that may occur while
* establishing the mapping is thrown.
* The same as invoking the `map` function, except any error that may occur
* while establishing the mapping is wrapped in a `std::system_error` and is
* thrown.
*/
basic_mmap(const handle_type handle, const size_type offset = 0, const size_type length = map_entire_file)
{

View File

@ -88,8 +88,9 @@ public:
}
/**
* The same as invoking the `map` function, except any error that may occur while
* establishing the mapping is thrown.
* The same as invoking the `map` function, except any error that may occur
* while establishing the mapping is wrapped in a `std::system_error` and is
* thrown.
*/
template<typename String>
basic_shared_mmap(const String& path, const size_type offset = 0, const size_type length = map_entire_file)
@ -100,8 +101,9 @@ public:
}
/**
* The same as invoking the `map` function, except any error that may occur while
* establishing the mapping is thrown.
* The same as invoking the `map` function, except any error that may occur
* while establishing the mapping is wrapped in a `std::system_error` and is
* thrown.
*/
basic_shared_mmap(const handle_type handle, const size_type offset = 0, const size_type length = map_entire_file)
{