Browse Source

Use Exception::getErrorCode() in main() instead of error_code::UNKNOWN_ERROR
unconditionally.

Tatsuhiro Tsujikawa 15 years ago
parent
commit
bc798ae4e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main.cc

+ 1 - 1
src/main.cc

@@ -285,7 +285,7 @@ int main(int argc, char* argv[])
     r = aria2::main(argc, argv);
   } catch(aria2::Exception& ex) {
     std::cerr << EX_EXCEPTION_CAUGHT << "\n" << ex.stackTrace() << std::endl;
-    r = aria2::error_code::UNKNOWN_ERROR;
+    r = ex.getErrorCode();
   }
   return r;
 }