vmtester: Handle "invalid argument" error

This commit is contained in:
Paweł Bylica 2019-03-15 12:47:53 +01:00
parent fd1d182be6
commit cdbbd6a757
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
// EVMC: Ethereum Client-VM Connector API.
// Copyright 2018 The EVMC Authors.
// Licensed under the Apache License, Version 2.0. See the LICENSE file.
// Copyright 2019 The EVMC Authors.
// Licensed under the Apache License, Version 2.0.
#include "vmtester.hpp"
@ -52,6 +52,9 @@ int main(int argc, char* argv[])
case EVMC_LOADER_SYMBOL_NOT_FOUND:
std::cerr << "EVMC create function not found in " << vm_path << "\n";
return static_cast<int>(ec);
case EVMC_LOADER_INVALID_ARGUMENT:
std::cerr << "Invalid argument: \"" << vm_path << "\"\n";
return static_cast<int>(ec);
default:
std::cerr << "Unexpected error in evmc_load(): " << ec << "\n";
return static_cast<int>(ec);