#3427 closed enhancement (fixed)
[PATCH] Improve error message when trying to replay a directory
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 20 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
If you accidentally give a directory name instead of the path to the commands.txt file when attempting to go into visual- or non-visual replaymode, then you will get the following error:
terminate called after throwing an instance of 'std::ios_base::failure' what(): basic_filebuf::underflow error reading the file
As we already have a nice error in case the file doesn't exist, we should check that case too:
static void RunGameOrAtlas(int argc, const char* argv[]) ... if (!FileExists(OsPath(replayFile))) { debug_printf("ERROR: The requested replay file '%s' does not exist!\n", replayFile.c_str()); return; }
Attachments (1)
Change History (5)
by , 9 years ago
Attachment: | t3427_improve_replay_error_v1.patch added |
---|
comment:1 by , 9 years ago
Keywords: | patch review added |
---|---|
Milestone: | Backlog → Alpha 19 |
Summary: | Improve error message when trying to replay a directory → [PATCH] Improve error message when trying to replay a directory |
comment:2 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
comment:3 by , 8 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 by , 8 years ago
Keywords: | review removed |
---|
Note:
See TracTickets
for help on using tickets.
In 17501: