diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-28 16:52:02 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-28 16:52:02 +0900 |
| commit | 947967fc631f885dae3726a80de3a85084fbca81 (patch) | |
| tree | d2cab447a42fe1728b470a664bf652ab4e9a54a3 /src/option_processing.cc | |
| parent | 13e3cf2573a6d3053674563c26cbbeac8ae42f36 (diff) | |
Renamed DownloadErrorCode.h as error_code.h. Renamed
downloaderrorcode::Value as error_code::Value.
Diffstat (limited to 'src/option_processing.cc')
| -rw-r--r-- | src/option_processing.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/option_processing.cc b/src/option_processing.cc index 820bf48f..bb5ef3be 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -53,7 +53,7 @@ #include "File.h" #include "fmt.h" #include "OptionHandlerException.h" -#include "DownloadResultCode.h" +#include "error_code.h" #include "SimpleRandomizer.h" #include "bittorrent_helper.h" #ifndef HAVE_DAEMON @@ -103,7 +103,7 @@ void option_processing(Option& op, std::vector<std::string>& uris, if(op.defined("version")) { showVersion(); - exit(downloadresultcode::FINISHED); + exit(error_code::FINISHED); } if(op.defined("help")) { std::string keyword; @@ -120,7 +120,7 @@ void option_processing(Option& op, std::vector<std::string>& uris, } } showUsage(keyword, oparser); - exit(downloadresultcode::FINISHED); + exit(error_code::FINISHED); } } @@ -145,17 +145,17 @@ void option_processing(Option& op, std::vector<std::string>& uris, << oparser.findByName(e.getOptionName())->getDescription() << std::endl; } - exit(downloadresultcode::UNKNOWN_ERROR); + exit(error_code::UNKNOWN_ERROR); } catch(Exception& e) { std::cerr << "Parse error in " << cfname << "\n" << e.stackTrace() << std::endl; - exit(downloadresultcode::UNKNOWN_ERROR); + exit(error_code::UNKNOWN_ERROR); } } else if(!ucfname.empty()) { std::cerr << fmt("Configuration file %s is not found.", cfname.c_str()) << "\n"; showUsage(TAG_HELP, oparser); - exit(downloadresultcode::UNKNOWN_ERROR); + exit(error_code::UNKNOWN_ERROR); } } // Override configuration with environment variables. @@ -175,11 +175,11 @@ void option_processing(Option& op, std::vector<std::string>& uris, << "Usage:" << "\n" << *oparser.findByName(e.getOptionName()) << std::endl; - exit(downloadresultcode::UNKNOWN_ERROR); + exit(error_code::UNKNOWN_ERROR); } catch(Exception& e) { std::cerr << e.stackTrace() << std::endl; showUsage(TAG_HELP, oparser); - exit(downloadresultcode::UNKNOWN_ERROR); + exit(error_code::UNKNOWN_ERROR); } if( #ifdef ENABLE_XML_RPC @@ -195,13 +195,13 @@ void option_processing(Option& op, std::vector<std::string>& uris, if(uris.empty()) { std::cerr << MSG_URI_REQUIRED << std::endl; showUsage(TAG_HELP, oparser); - exit(downloadresultcode::UNKNOWN_ERROR); + exit(error_code::UNKNOWN_ERROR); } } if(op.getAsBool(PREF_DAEMON)) { if(daemon(0, 0) < 0) { perror(MSG_DAEMON_FAILED); - exit(downloadresultcode::UNKNOWN_ERROR); + exit(error_code::UNKNOWN_ERROR); } } } |
