Re: rhetorical question of the day

2007-10-29 Thread Abdelrazak Younes

Andre Poenitz wrote:

What's the reason of defining and throwing, but never catching
some exception?


IIRC, I've put some code in the Qt event loop to catch everything that 
was not caught before.




Andre'

PS: Hint: It's 60k extra compilation...


What? The inheritance of std::bad_cast? Would it help if we just inherit 
std::exception?


Also, I guess this class can be made private.

Abdel.



rhetorical question of the day

2007-10-29 Thread Andre Poenitz

What's the reason of defining and throwing, but never catching
some exception?

Andre'

PS: Hint: It's 60k extra compilation...
Index: support/docstring.h
===
--- support/docstring.h (revision 21267)
+++ support/docstring.h (working copy)
@@ -16,7 +16,7 @@
 #include "support/types.h"
 
 #include 
-#include 
+//#include 
 
 namespace lyx {
 
@@ -42,9 +42,9 @@
 docstring const from_local8bit(std::string const & s);
 
 /// Exception thrown by to_local8bit if the string could not be converted
-class to_local8bit_failure : public std::bad_cast {
+class to_local8bit_failure /*: public std::bad_cast*/ {
 public:
-   to_local8bit_failure() throw() : std::bad_cast() {}
+   to_local8bit_failure() throw() /*: std::bad_cast()*/ {}
virtual ~to_local8bit_failure() throw() {}
virtual const char* what() const throw();
 };