Am 28.05.2013 00:23, schrieb Florian Jung: > Am 28.05.2013 00:11, schrieb Tim E. Real: >> On May 27, 2013 10:33:18 PM Florian Jung wrote: >>> Hi >>> >>> i just noticed that we seem to have exception handling disabled >>> (try/catch/throw). Is this by purpose? And why? >> >> However, being many years later, I recently Googled exceptions for linux. >> To my surprise, I found many sites that concluded exceptions are not >> a good idea and not reliable!
i told to a system programmer about this. According to him, C++ came right out of hell, and exceptions are totally broken in C++. Luckily, C++ with QT, *using the QT paradigms* is a quite reasonable language (we should really adhere to the QT paradigms, which we are not!), and exceptions can be used in certain cases: No exception may leave out of a scope where you can control it. Because, when anything throws an exception, it immediately enters the catch block. This means, all heap-space which has been allocated before CANNOT BE FREED, because all pointers to there are *lost*. Thus, you must free everything before throwing stuff, or you must not allocate anything in a try block (or ensure that you will free it, using smart pointers or the like. QT offers that.) Plus, exception handling adds a rather big runtime library to the code, which increases code size but does not affect execution speed. As MusE is pretty big anyway, i don't consider this a problem. IMHO, in certain cases, exceptions are fine. Especially if paired with the *overall use* of smart pointers. Just FYI. greetings, flo ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Lmuse-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lmuse-developer
