1
0
Fork 0

Spectre/System/File: add getErrorMessage()

This commit is contained in:
Henrik Hautakoski 2020-01-18 22:16:47 +01:00
parent 59a4f1347a
commit dc04a12922
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
2 changed files with 21 additions and 1 deletions

View file

@ -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