How to disable PostgreSQL error popup windows lazarus / 12-Debugger ---------------------------------------------------------------------- maKiaveL · 2010-06-04 09:04 SCREENSHOT: http://img121.imageshack.us/img121/9215/postgresqlerror.png How can I make Lazarus not to implement that popup error messages in my application? I already create exceptions for that kind of errors so I don't need Lazarus to make the application show these automatic popup windows. This still happens if run the application without debugger or even when I made "strip" to the .exe . Can someone tell me how to disable it? Thank you very much! ---------------------------------------------------------------------- Troodon · 2010-06-04 09:07 Code, please? ---------------------------------------------------------------------- maKiaveL · 2010-06-04 09:09 This is how I take care of the exception myself. This away two popup windows appears! The one I implemented and the other is the same as it is in screenshot. I want to force the last one not to appear...   try       begin       FPrincipal.SQLTransaction.EndTransaction; FPrincipal.SQLTransaction.StartTransaction;       FPrincipal.PQConnection.ExecuteDirect(sql, SQLTransaction);       FPrincipal.SQLTransaction.Commit;       end;    except       on E : EDatabaseError do       begin       SQLTransaction.Rollback;       SQLTransaction.EndTransaction;       ShowMessage(ErrorHandling(E.Message));       end;       on E : Exception do       exit;    end; ---------------------------------------------------------------------- Troodon · 2010-06-04 10:22 Try this and see what happens: Code: [Select]except   on E: Exception do     ShowMessage(E.ClassName + ' error raised, with message: ' + E.Message); end; Are you sure that the on E: EDatabaseError do block can be executed without raising an error? ---------------------------------------------------------------------- maKiaveL · 2010-06-04 10:35 Still the same. It's like it didn't belong to Exception...  Because nothing that I put on on E: Exception do runs when a POSTGRESQL error occurs. ---------------------------------------------------------------------- Troodon · 2010-06-04 10:54 First, you need to find the offending statement:. Code: [Select]try   ShowMessage('ok0');   FPrincipal.SQLTransaction.EndTransaction;   ShowMessage('ok1');         FPrincipal.SQLTransaction.StartTransaction;   ShowMessage('ok2');   FPrincipal.PQConnection.ExecuteDirect(sql, SQLTransaction);   ShowMessage('ok3');   FPrincipal.SQLTransaction.Commit;   ShowMessage('ok4'); except   on E: Exception do     ShowMessage(E.ClassName + ' error raised, with message: ' + E.Message); end; Second, does this also happen when you run the standalone application (not in Lazarus)? ---------------------------------------------------------------------- maKiaveL · 2010-06-04 11:30 First, As expected the offending statement is FPrincipal.PQConnection.ExecuteDirect(sql, SQLTransaction); since ok3 doesn't popup.As before, the ShowMessage(E.ClassName + ' error raised, with message: ' + E.Message); didn't run. Second, Yes, it also happen in standalone application. ---------------------------------------------------------------------- Troodon · 2010-06-04 11:38 Try running this code before the other try-except block to see if the error handling mechanism is generally disabled for some reason: Code: [Select]var   a: Integer;   b: Integer; //..   try     b := 0;     a := 1 Div b;   except     on E: Exception do       ShowMessage('Division by zero');   end;   If it's not and the problem persists then I would think that the error popup window is not generated by your application. I also noticed that the popup window displays an mtInformation icon rather than an mtError icon, which suggests that it's a ShowMessage dialog. ---------------------------------------------------------------------- maKiaveL · 2010-06-04 13:37 project raised exception class external: sigfpe ... i wasn't expecting that.. :s ---------------------------------------------------------------------- Troodon · 2010-06-04 19:07 Yes, because you run it from Lazarus. Run it as a standalone application, from its folder.