better error handling which always reports the right file name

This commit is contained in:
krangelov
2021-09-07 15:54:27 +02:00
parent 8936e6211e
commit a843ddba55
11 changed files with 95 additions and 49 deletions

View File

@@ -10,7 +10,7 @@
class PGF_INTERNAL_DECL PgfReader
{
public:
PgfReader(std::istream *in);
PgfReader(std::istream *in, const char *filepath);
uint8_t read_uint8();
uint16_t read_u16be();
@@ -74,6 +74,7 @@ public:
private:
std::istream *in;
const char* filepath;
object read_name_internal(size_t struct_size);
object read_text_internal(size_t struct_size);