~ubuntu-branches/debian/experimental/libtorrent/experimental

« back to all changes in this revision

Viewing changes to src/torrent/exceptions.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Rivas
  • Date: 2007-03-31 10:31:05 UTC
  • mto: (4.1.4 gutsy) (6.2.1 squeeze) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20070331103105-jzpp1rml6ud0ff75
Tags: upstream-0.11.4
ImportĀ upstreamĀ versionĀ 0.11.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
#include "config.h"
38
38
 
 
39
#include <cerrno>
 
40
 
39
41
#include "exceptions.h"
40
42
 
41
43
namespace torrent {
44
46
// exceptions. This allows us to create breakpoints at throws. This is
45
47
// limited to rarely thrown exceptions.
46
48
 
47
 
internal_error::internal_error(const std::string& msg) :
48
 
  program_error(msg) {
49
 
}
50
 
 
51
 
client_error::client_error(const std::string& msg) :
52
 
  program_error(msg) {
53
 
}
54
 
 
55
 
storage_error::storage_error(const std::string& msg) :
56
 
  local_error(msg) {
57
 
}
 
49
internal_error::internal_error(const char* msg) : m_msg(msg) {
 
50
}
 
51
internal_error::internal_error(const std::string& msg) : m_msg(msg) {
 
52
}
 
53
 
 
54
communication_error::communication_error(const char* msg) : m_msg(msg) {}
 
55
communication_error::communication_error(const std::string& msg) : m_msg(msg) {}
 
56
 
 
57
const char*
 
58
connection_error::what() const throw() {
 
59
  return std::strerror(m_errno);
 
60
}
 
61
 
 
62
storage_error::storage_error(const char* msg) : m_msg(msg) {}
 
63
storage_error::storage_error(const std::string& msg) : m_msg(msg) {}
 
64
 
 
65
resource_error::resource_error(const char* msg) : m_msg(msg) {}
 
66
resource_error::resource_error(const std::string& msg) : m_msg(msg) {}
 
67
 
 
68
input_error::input_error(const char* msg) : m_msg(msg) {}
 
69
input_error::input_error(const std::string& msg) : m_msg(msg) {}
58
70
 
59
71
}