Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, January 2007
a signal for exception


Message 1 in thread

Dear All,
   
  Is there any Signal or another way to inform me that an exception is occurred?
   
  Thank you in advance.
  Navid
   

 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

Message 2 in thread

Navid Parvini wrote:
> Dear All,
>    
>   Is there any Signal or another way to inform me that an exception is occurred?
>    
>   Thank you in advance.
>   Navid

What about setting up a custom exception class and an own signal and 
emitting that signal in one of your exception classes methods?

like:

class MyException
{
public:
MyException( ... );
emitExceptionSignal();
}

try {
doSomething();
doSomeotherthing();
} catch( MyException e )
{
e.emitExceptionSignal();
}

Sorry if I'm wrong but this was a good looking idea in my view... :)

--
 [ signature omitted ] 

Message 3 in thread

On 12.01.07 23:44:32, Navid Parvini wrote:
>   Is there any Signal or another way to inform me that an exception is occurred?

What type of "exception"? For C++ exceptions: No, Qt, IIRC doesn't use
C++ Exceptions at all. Also I don't think a Qt signal is the apropriate
way to handle a C++ exceptions, especially as there are language ways of
dealing with them.

Andreas

-- 
 [ signature omitted ]