Ticket #811 (closed task: fixed)

Opened 2 years ago

Last modified 2 years ago

Unhelpful error message when unable to write file

Reported by: Philip Owned by:
Priority: Should Have Milestone: Alpha 5
Component: Core engine Keywords:
Cc: jan

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

comment:1 Changed 2 years ago by jan

  • Status changed from new to closed
  • Resolution set to fixed

(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 Changed 2 years ago by fabio

  • Milestone changed from Backlog to Alpha 5
Note: See TracTickets for help on using tickets.