Codebase list xd / cb1a39d6-a8d6-466b-9e8d-b71176d98d43/main handle.cc
cb1a39d6-a8d6-466b-9e8d-b71176d98d43/main

Tree @cb1a39d6-a8d6-466b-9e8d-b71176d98d43/main (Download .tar.gz)

handle.cc @cb1a39d6-a8d6-466b-9e8d-b71176d98d43/mainraw · history · blame

#include "main.ih"

int handle(exception_ptr ptr)
try
{
    rethrow_exception(ptr);
}
catch(exception const &err)     // handle exceptions
{
    cerr << err.what() << '\n';

                                            // preventa a directory change 
    noInput();                              // if --input wasn't specified

    return Selector::ERROR;
}
catch(int x)
{
    if (ArgConfig::instance().option("hv"))
        x = Selector::USAGE;
    else if (x == Selector::NO_SOLUTIONS)
        cerr << "No Solutions\n";

    noInput();

    return x;
}