Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#811 closed task (fixed)

Unhelpful error message when unable to write file

Reported by: Philip Taylor Owned by:
Priority: Should Have Milestone: Alpha 5
Component: Core engine Keywords:
Cc: Jan Wassenberg Patch:

Description

When the game is unable to write a file (in particular when it's trying to create a cache file when it doesn't have write permission to the directory), it gives an error like

io.h(73): Assertion failed: "fd >= 0"
Assertion failed: "fd >= 0"
Location: io.h:73 (Validate)

...

errno = 0 (?)
OS error = ?

(via io::Store -> io::Run -> io::Operation::Validate) which is very uninformative. In contrast, if CreateDirectories fails due to permission problems, it says "Function call failed: return value was -110300 (Insufficient access rights to open file)" - it should do something similar when failing to create files.

Change History (2)

comment:1 by Jan Wassenberg, 13 years ago

Resolution: fixed
Status: newclosed

(In [9368]) add error code for file not found. return error code from io::Load, warn and return from io::Store (both without triggering assertions). remove out of date comment in io.cpp fixes #811

comment:2 by fabio, 13 years ago

Milestone: BacklogAlpha 5
Note: See TracTickets for help on using tickets.