[Qt-interest] How to handle error

Ramesh ramesh.bs at robosoftin.com
Fri Jun 25 12:36:28 CEST 2010


Can you tell me how to use the env variable, I am not getting.
Export means how?

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Sean Harmer
Sent: Friday, June 25, 2010 3:59 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to handle error

On Friday 25 June 2010 11:08:20 Ramesh wrote:
> I don't think any class in Qt which tell the reason why error is appeared.
>
> Some time we do mistake in  writing the programmes, some programme run
with
> error only, it's pretty tough to identify the cause for error in Debugging
> the code.
>
> For example in connecting the SIGNAL of one class to SLOT of another  need
> to have many conditions like, class object should be meta object,
>
> parameters should be same. even if we do small mistake also programme will
> compile, but signal slot will not work.
>
> Like this there may be verity of problems.
>
> Is there any class which popup error number, using that we can identify
> easily the cause for problem. Is there any such mechanism in Qt?

For such runtime errors you can export the environment variable
QT_FATAL_WARNINGS="1" and then run your application. If you have a broken
connect() statement this will cause Qt to print a warning and assert so you
can easily find where in your code the problematic connection is.

Sean
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.



More information about the Qt-interest-old mailing list