mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-22 15:31:50 +00:00
better error when unable to load executable.
This commit is contained in:
parent
fbb92ef08d
commit
56fc471255
10
bin/main.cpp
10
bin/main.cpp
@ -682,8 +682,14 @@ int main(int argc, char **argv)
|
||||
|
||||
CreateStack();
|
||||
|
||||
uint16_t err = Loader::Native::LoadFile(command);
|
||||
if (err) exit(EX_CONFIG);
|
||||
{
|
||||
auto rv = Loader::Native::LoadFile(command);
|
||||
if (!rv) {
|
||||
fprintf(stderr, "### Unable to load %s\n", command.c_str());
|
||||
fprintf(stderr, "# %s (OS error %d)\n", ErrorName(rv.error()), rv.error());
|
||||
exit(EX_CONFIG);
|
||||
}
|
||||
}
|
||||
|
||||
GlobalInit();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user