diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-27 04:47:26 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-27 04:47:26 +0000 |
| commit | 327cbcb1eb422900d99b3e947babc1f3c8dc2f6a (patch) | |
| tree | c775d69e139e9df74d8483b203b03144ce18569b /src | |
| parent | e51e7207cfa27d903816101aef9d9447eb562672 (diff) | |
2008-09-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error on OptionHandlerException
* src/Makefile.am
* src/OptionHandlerException.cc
* src/OptionHandlerException.h
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.am | 2 | ||||
| -rw-r--r-- | src/Makefile.in | 37 | ||||
| -rw-r--r-- | src/OptionHandlerException.cc | 69 | ||||
| -rw-r--r-- | src/OptionHandlerException.h | 26 |
4 files changed, 97 insertions, 37 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 04bc8fb5..221ccbd3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -192,7 +192,7 @@ SRCS = Socket.h\ NsCookieParser.cc NsCookieParser.h\ CookieStorage.cc CookieStorage.h\ SocketBuffer.cc SocketBuffer.h\ - OptionHandlerException.h + OptionHandlerException.cc OptionHandlerException.h if HAVE_LIBZ SRCS += GZipDecoder.cc GZipDecoder.h diff --git a/src/Makefile.in b/src/Makefile.in index 133ba456..da9b29cc 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -413,10 +413,11 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \ InOrderURISelector.h ServerStatURISelector.cc \ ServerStatURISelector.h NsCookieParser.cc NsCookieParser.h \ CookieStorage.cc CookieStorage.h SocketBuffer.cc \ - SocketBuffer.h OptionHandlerException.h GZipDecoder.cc \ - GZipDecoder.h Sqlite3MozCookieParser.cc \ - Sqlite3MozCookieParser.h AsyncNameResolver.cc \ - AsyncNameResolver.h IteratableChunkChecksumValidator.cc \ + SocketBuffer.h OptionHandlerException.cc \ + OptionHandlerException.h GZipDecoder.cc GZipDecoder.h \ + Sqlite3MozCookieParser.cc Sqlite3MozCookieParser.h \ + AsyncNameResolver.cc AsyncNameResolver.h \ + IteratableChunkChecksumValidator.cc \ IteratableChunkChecksumValidator.h \ IteratableChecksumValidator.cc IteratableChecksumValidator.h \ CheckIntegrityCommand.cc CheckIntegrityCommand.h \ @@ -807,12 +808,13 @@ am__objects_18 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \ ServerStatMan.$(OBJEXT) InOrderURISelector.$(OBJEXT) \ ServerStatURISelector.$(OBJEXT) NsCookieParser.$(OBJEXT) \ CookieStorage.$(OBJEXT) SocketBuffer.$(OBJEXT) \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) \ - $(am__objects_4) $(am__objects_5) $(am__objects_6) \ - $(am__objects_7) $(am__objects_8) $(am__objects_9) \ - $(am__objects_10) $(am__objects_11) $(am__objects_12) \ - $(am__objects_13) $(am__objects_14) $(am__objects_15) \ - $(am__objects_16) $(am__objects_17) + OptionHandlerException.$(OBJEXT) $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) $(am__objects_6) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) $(am__objects_10) \ + $(am__objects_11) $(am__objects_12) $(am__objects_13) \ + $(am__objects_14) $(am__objects_15) $(am__objects_16) \ + $(am__objects_17) am_libaria2c_a_OBJECTS = $(am__objects_18) libaria2c_a_OBJECTS = $(am_libaria2c_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" @@ -1135,13 +1137,13 @@ SRCS = Socket.h SocketCore.cc SocketCore.h BinaryStream.h Command.cc \ InOrderURISelector.h ServerStatURISelector.cc \ ServerStatURISelector.h NsCookieParser.cc NsCookieParser.h \ CookieStorage.cc CookieStorage.h SocketBuffer.cc \ - SocketBuffer.h OptionHandlerException.h $(am__append_1) \ - $(am__append_2) $(am__append_3) $(am__append_4) \ - $(am__append_5) $(am__append_6) $(am__append_7) \ - $(am__append_8) $(am__append_9) $(am__append_10) \ - $(am__append_11) $(am__append_12) $(am__append_13) \ - $(am__append_14) $(am__append_15) $(am__append_16) \ - $(am__append_17) + SocketBuffer.h OptionHandlerException.cc \ + OptionHandlerException.h $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) \ + $(am__append_6) $(am__append_7) $(am__append_8) \ + $(am__append_9) $(am__append_10) $(am__append_11) \ + $(am__append_12) $(am__append_13) $(am__append_14) \ + $(am__append_15) $(am__append_16) $(am__append_17) noinst_LIBRARIES = libaria2c.a libaria2c_a_SOURCES = $(SRCS) aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\ @@ -1442,6 +1444,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OSMetalinkParserState.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Option.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionHandlerException.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionHandlerFactory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionParser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PStringBuildVisitor.Po@am__quote@ diff --git a/src/OptionHandlerException.cc b/src/OptionHandlerException.cc new file mode 100644 index 00000000..70f5b0c3 --- /dev/null +++ b/src/OptionHandlerException.cc @@ -0,0 +1,69 @@ +/* <!-- copyright */ +/* + * aria2 - The high speed download utility + * + * Copyright (C) 2006 Tatsuhiro Tsujikawa + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * In addition, as a special exception, the copyright holders give + * permission to link the code of portions of this program with the + * OpenSSL library under certain conditions as described in each + * individual source file, and distribute linked combinations + * including the two. + * You must obey the GNU General Public License in all respects + * for all of the code used other than OpenSSL. If you modify + * file(s) with this exception, you may extend this exception to your + * version of the file(s), but you are not obligated to do so. If you + * do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source + * files in the program, then also delete it here. + */ +/* copyright --> */ +#include "OptionHandlerException.h" +#include "StringFormat.h" + +namespace aria2 { + +const std::string OptionHandlerException::MESSAGE +("Exception occurred while processing option %s:"); + +OptionHandlerException::OptionHandlerException(const std::string& optName): + FatalException + (StringFormat(MESSAGE.c_str(), optName.c_str()).str()), _optName(optName) {} + +OptionHandlerException::OptionHandlerException(const std::string& optName, + const Exception& cause): + FatalException + (StringFormat(MESSAGE.c_str(), optName.c_str()).str(), cause), + _optName(optName) {} + +OptionHandlerException::OptionHandlerException(const OptionHandlerException& e): + FatalException(e), _optName(e._optName) {} + +OptionHandlerException::~OptionHandlerException() throw() {} + +const std::string& OptionHandlerException::getOptionName() const throw() +{ + return _optName; +} + +SharedHandle<Exception> OptionHandlerException::copy() const +{ + SharedHandle<Exception> e(new OptionHandlerException(*this)); + return e; +} + +} // namespace aria2 diff --git a/src/OptionHandlerException.h b/src/OptionHandlerException.h index 83bf467e..2304fe0f 100644 --- a/src/OptionHandlerException.h +++ b/src/OptionHandlerException.h @@ -35,7 +35,6 @@ #ifndef _D_OPTION_HANDLER_EXCEPTION_H_ #define _D_OPTION_HANDLER_EXCEPTION_H_ #include "FatalException.h" -#include "StringFormat.h" namespace aria2 { @@ -43,30 +42,19 @@ class OptionHandlerException:public FatalException { private: std::string _optName; - static const std::string MESSAGE = - "Exception occurred while processing option %s:"; + static const std::string MESSAGE; protected: - virtual SharedHandle<Exception> copy() const - { - SharedHandle<Exception> e(new OptionHandlerException(*this)); - return e; - } + virtual SharedHandle<Exception> copy() const; public: - OptionHandlerException(const std::string& optName): - FatalException - (StringFormat(MESSAGE, optName.c_str()).str()), _optName(optName) {} + OptionHandlerException(const std::string& optName); - OptionHandlerException(const std::string& optName, - const Exception& cause): - FatalException - (StringFormat(MESSAGE, optName.c_str()).str(), cause), _optName(optName) {} + OptionHandlerException(const std::string& optName, const Exception& cause); - OptionHandlerException(const OptionHandlerException& e): - FatalException(e), _optName(e._optName) {} + OptionHandlerException(const OptionHandlerException& e); - virtual ~OptionHandlerException() throw() {} + virtual ~OptionHandlerException() throw(); - const std::string& getOptionName() const throw() { return _optName; } + const std::string& getOptionName() const throw(); }; } // namespace aria2 |
