Spectre/System/File: add getErrorMessage()
This commit is contained in:
parent
59a4f1347a
commit
dc04a12922
2 changed files with 21 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
|
||||
namespace sp {
|
||||
|
||||
|
|
@ -54,6 +55,8 @@ public :
|
|||
// Close the file.
|
||||
void close();
|
||||
|
||||
std::string getErrorMessage() const;
|
||||
|
||||
// Get the current position in the file.
|
||||
size_t pos();
|
||||
|
||||
|
|
@ -103,6 +106,9 @@ public :
|
|||
private :
|
||||
|
||||
FILE *m_handle;
|
||||
|
||||
// Error
|
||||
mutable std::error_condition m_error;
|
||||
};
|
||||
|
||||
} //namespace sp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue