diff options
Diffstat (limited to 'src/script.cc')
| -rw-r--r-- | src/script.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/script.cc b/src/script.cc index 75eab55..4695acc 100644 --- a/src/script.cc +++ b/src/script.cc @@ -115,7 +115,7 @@ void TReadScriptFile::open(const char *FileName){ if(this->File[Depth] == NULL){ int ErrCode = errno; ::error("TReadScriptFile::open: Kann Datei %s nicht öffnen.\n", this->Filename[Depth]); - ::error("Fehler %d: %s.\n", ErrCode, strerror(ErrCode)); + ::error("Fehler %d: %s.\n", ErrCode, GetErrorDescription(ErrCode)); throw "Cannot open script-file"; } @@ -582,7 +582,7 @@ void TWriteScriptFile::open(const char *FileName){ if(this->File == NULL){ int ErrCode = errno; ::error("TWriteScriptFile: Kann Datei %s nicht anlegen.\n", FileName); - ::error("Fehler %d: %s.\n", ErrCode, strerror(ErrCode)); + ::error("Fehler %d: %s.\n", ErrCode, GetErrorDescription(ErrCode)); throw "Cannot create script-file"; } @@ -751,7 +751,7 @@ void TReadBinaryFile::close(void){ int ErrCode = errno; ::error("TReadBinaryFile::close: Fehler beim Schließen der Datei.\n"); ::error("# Datei: %s, Fehlercode: %d (%s)\n", - this->Filename, ErrCode, strerror(ErrCode)); + this->Filename, ErrCode, GetErrorDescription(ErrCode)); } this->File = NULL; } @@ -811,7 +811,7 @@ uint8 TReadBinaryFile::readByte(void){ int Position = this->getPosition(); ::error("TReadBinaryFile::readByte: Fehler beim Lesen eines Bytes\n"); ::error("# Datei: %s, Position: %d, Rückgabewert: %d, Fehlercode: %d (%s)\n", - this->Filename, Position, Result, ErrCode, strerror(ErrCode)); + this->Filename, Position, Result, ErrCode, GetErrorDescription(ErrCode)); // NOTE(fusion): Close file and make a backup, possibly for further inspection. if(fclose(this->File) != 0){ @@ -832,7 +832,7 @@ void TReadBinaryFile::readBytes(uint8 *Buffer, int Count){ int Position = this->getPosition(); ::error("TReadBinaryFile::readBytes: Fehler beim Lesen von %d Bytes\n", Count); ::error("# Datei: %s, Position %d, Rückgabewert: %d, Fehlercode: %d (%s)\n", - this->Filename, Position, Result, ErrCode, strerror(ErrCode)); + this->Filename, Position, Result, ErrCode, GetErrorDescription(ErrCode)); // NOTE(fusion): Close file and make a backup, possibly for further inspection. if(fclose(this->File) != 0){ @@ -885,7 +885,7 @@ void TWriteBinaryFile::open(const char *FileName){ if(this->File == NULL){ int ErrCode = errno; ::error("TWriteBinaryFile::open: Kann Datei %s nicht anlegen.\n", FileName); - ::error("Fehler %d: %s.\n", ErrCode, strerror(ErrCode)); + ::error("Fehler %d: %s.\n", ErrCode, GetErrorDescription(ErrCode)); snprintf(ErrorString, sizeof(ErrorString), "Cannot create file %s.", FileName); @@ -902,7 +902,7 @@ void TWriteBinaryFile::close(void){ int ErrCode = errno; ::error("TWriteBinaryFile::close: Fehler beim Schließen der Datei.\n"); ::error("# Datei: %s, Fehlercode: %d (%s)\n", - this->Filename, ErrCode, strerror(ErrCode)); + this->Filename, ErrCode, GetErrorDescription(ErrCode)); } this->File = NULL; } @@ -928,7 +928,7 @@ void TWriteBinaryFile::writeByte(uint8 Byte){ int ErrCode = errno; ::error("TWriteBinaryFile::writeByte: Fehler beim Schreiben eines Bytes\n"); ::error("# Datei: %s, Rückgabewert: %d, Fehlercode: %d (%s)\n", - this->Filename, Result, ErrCode, strerror(ErrCode)); + this->Filename, Result, ErrCode, GetErrorDescription(ErrCode)); // NOTE(fusion): Close file and make a backup, possibly for further inspection. if(fclose(this->File) != 0){ @@ -947,7 +947,7 @@ void TWriteBinaryFile::writeBytes(const uint8 *Buffer, int Count){ int ErrCode = errno; ::error("TWriteBinaryFile::writeBytes: Fehler beim Schreiben von %d Bytes\n", Count); ::error("# Datei: %s, Rückgabewert: %d, Fehlercode: %d (%s)\n", - this->Filename, Result, ErrCode, strerror(ErrCode)); + this->Filename, Result, ErrCode, GetErrorDescription(ErrCode)); // NOTE(fusion): Close file and make a backup, possibly for further inspection. if(fclose(this->File) != 0){ |
