diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-02 10:03:00 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-02 10:03:00 +0900 |
| commit | aee621b3d40a270d827f5d3441dfccec66705ca9 (patch) | |
| tree | c27eec43a940c2489dedb2aa550842873815e4fd /src/aria2api.cc | |
| parent | e5cccd335cc99f28615d44d5cb0b4400239c63cd (diff) | |
Don't exit on error in option_processing
Still it exits when -v or -h is given. They are now guarded by
standalone variable and only do so when it is true.
Diffstat (limited to 'src/aria2api.cc')
| -rw-r--r-- | src/aria2api.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/aria2api.cc b/src/aria2api.cc index 02171b7a..d856d205 100644 --- a/src/aria2api.cc +++ b/src/aria2api.cc @@ -85,7 +85,12 @@ int libraryDeinit() Session* sessionNew(const KeyVals& options) { int rv; - Session* session = new Session(options); + Session* session; + try { + session = new Session(options); + } catch(RecoverableException& e) { + return 0; + } if(session->context->reqinfo) { rv = session->context->reqinfo->prepare(); if(rv != 0) { |
