Skip to content

Commit

Permalink
Unified writing style in main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
matken11235 committed Jan 26, 2019
1 parent 9a70e67 commit 4f5359a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int error_handling(std::string&& s)
int exec(std::string&& str, VS&& vs)
{
namespace inference = poac::core::infer;
namespace except = poac::core::exception;
namespace exception = poac::core::exception;
namespace cli = poac::io::cli;
using namespace std::string_literals;

Expand All @@ -33,18 +33,18 @@ int exec(std::string&& str, VS&& vs)
inference::apply("exec"s, str, std::move(vs));
return EXIT_SUCCESS;
}
catch (const except::invalid_first_arg& e) {
catch (const exception::invalid_first_arg& e) {
return error_handling(e.what());
}
catch (const except::invalid_second_arg& e) {
catch (const exception::invalid_second_arg& e) {
inference::apply("exec"s, "--help"s, VS({e.what()}));
return EXIT_FAILURE;
}
catch (const except::error& e) {
catch (const exception::error& e) {
std::cerr << cli::to_red("ERROR: ") << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (const except::warn& e) {
catch (const exception::warn& e) {
std::cout << cli::to_yellow("WARN: ") << e.what() << std::endl;
return EXIT_SUCCESS;
}
Expand Down

0 comments on commit 4f5359a

Please sign in to comment.