chiark
/
gitweb
/
~ryounger
/
brot2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d7db246
)
Make BrotException properly subclass std::exception.
author
Ross Younger
<onyx-commits@impropriety.org.uk>
Fri, 1 Feb 2013 20:38:34 +0000 (09:38 +1300)
committer
Ross Younger
<onyx-commits@impropriety.org.uk>
Fri, 1 Feb 2013 20:38:34 +0000 (09:38 +1300)
libbrot2/Exception.h
patch
|
blob
|
history
diff --git
a/libbrot2/Exception.h
b/libbrot2/Exception.h
index
8af4aed
..
9b51066
100644
(file)
--- a/
libbrot2/Exception.h
+++ b/
libbrot2/Exception.h
@@
-22,9
+22,9
@@
#include <string>
#include <iostream>
#include <sstream>
-#include <exception>
+#include <stdexcept>
-struct BrotException : std::exception {
+struct BrotException : public std::exception {
const std::string msg;
const std::string file;
const int line;
@@
-43,6
+43,9
@@
struct BrotException : std::exception {
virtual operator const std::string() const {
return detail();
}
+ virtual const char* what() const throw() {
+ return detail().c_str();
+ }
virtual ~BrotException() throw() {}
};