Mercurial > hg > svcore
comparison base/Exceptions.cpp @ 686:b4a8d8221eaf debug-output
Remove most toStdString calls (no longer needed, with debug header)
author | Chris Cannam |
---|---|
date | Thu, 12 May 2011 17:31:24 +0100 |
parents | 65d955c4d671 |
children | e802e550a1f2 |
comparison
equal
deleted
inserted
replaced
685:99222d4bfc78 | 686:b4a8d8221eaf |
---|---|
19 | 19 |
20 FileNotFound::FileNotFound(QString file) throw() : | 20 FileNotFound::FileNotFound(QString file) throw() : |
21 m_file(file) | 21 m_file(file) |
22 { | 22 { |
23 std::cerr << "ERROR: File not found: " | 23 std::cerr << "ERROR: File not found: " |
24 << file.toStdString() << std::endl; | 24 << file << std::endl; |
25 } | 25 } |
26 | 26 |
27 const char * | 27 const char * |
28 FileNotFound::what() const throw() | 28 FileNotFound::what() const throw() |
29 { | 29 { |
33 | 33 |
34 FailedToOpenFile::FailedToOpenFile(QString file) throw() : | 34 FailedToOpenFile::FailedToOpenFile(QString file) throw() : |
35 m_file(file) | 35 m_file(file) |
36 { | 36 { |
37 std::cerr << "ERROR: Failed to open file: " | 37 std::cerr << "ERROR: Failed to open file: " |
38 << file.toStdString() << std::endl; | 38 << file << std::endl; |
39 } | 39 } |
40 | 40 |
41 const char * | 41 const char * |
42 FailedToOpenFile::what() const throw() | 42 FailedToOpenFile::what() const throw() |
43 { | 43 { |
47 | 47 |
48 DirectoryCreationFailed::DirectoryCreationFailed(QString directory) throw() : | 48 DirectoryCreationFailed::DirectoryCreationFailed(QString directory) throw() : |
49 m_directory(directory) | 49 m_directory(directory) |
50 { | 50 { |
51 std::cerr << "ERROR: Directory creation failed for directory: " | 51 std::cerr << "ERROR: Directory creation failed for directory: " |
52 << directory.toStdString() << std::endl; | 52 << directory << std::endl; |
53 } | 53 } |
54 | 54 |
55 const char * | 55 const char * |
56 DirectoryCreationFailed::what() const throw() | 56 DirectoryCreationFailed::what() const throw() |
57 { | 57 { |
61 | 61 |
62 FileReadFailed::FileReadFailed(QString file) throw() : | 62 FileReadFailed::FileReadFailed(QString file) throw() : |
63 m_file(file) | 63 m_file(file) |
64 { | 64 { |
65 std::cerr << "ERROR: File read failed for file: " | 65 std::cerr << "ERROR: File read failed for file: " |
66 << file.toStdString() << std::endl; | 66 << file << std::endl; |
67 } | 67 } |
68 | 68 |
69 const char * | 69 const char * |
70 FileReadFailed::what() const throw() | 70 FileReadFailed::what() const throw() |
71 { | 71 { |
75 | 75 |
76 FileOperationFailed::FileOperationFailed(QString file, QString op) throw() : | 76 FileOperationFailed::FileOperationFailed(QString file, QString op) throw() : |
77 m_file(file), | 77 m_file(file), |
78 m_operation(op) | 78 m_operation(op) |
79 { | 79 { |
80 std::cerr << "ERROR: File " << op.toStdString() << " failed for file: " | 80 std::cerr << "ERROR: File " << op << " failed for file: " |
81 << file.toStdString() << std::endl; | 81 << file << std::endl; |
82 } | 82 } |
83 | 83 |
84 const char * | 84 const char * |
85 FileOperationFailed::what() const throw() | 85 FileOperationFailed::what() const throw() |
86 { | 86 { |
94 m_directory(directory), | 94 m_directory(directory), |
95 m_required(required), | 95 m_required(required), |
96 m_available(available) | 96 m_available(available) |
97 { | 97 { |
98 std::cerr << "ERROR: Not enough disc space available in " | 98 std::cerr << "ERROR: Not enough disc space available in " |
99 << directory.toStdString() << ": need " << required | 99 << directory << ": need " << required |
100 << ", only have " << available << std::endl; | 100 << ", only have " << available << std::endl; |
101 } | 101 } |
102 | 102 |
103 InsufficientDiscSpace::InsufficientDiscSpace(QString directory) throw() : | 103 InsufficientDiscSpace::InsufficientDiscSpace(QString directory) throw() : |
104 m_directory(directory), | 104 m_directory(directory), |
105 m_required(0), | 105 m_required(0), |
106 m_available(0) | 106 m_available(0) |
107 { | 107 { |
108 std::cerr << "ERROR: Not enough disc space available in " | 108 std::cerr << "ERROR: Not enough disc space available in " |
109 << directory.toStdString() << std::endl; | 109 << directory << std::endl; |
110 } | 110 } |
111 | 111 |
112 const char * | 112 const char * |
113 InsufficientDiscSpace::what() const throw() | 113 InsufficientDiscSpace::what() const throw() |
114 { | 114 { |